Why doesn't IE parse the XML returned from a WCF Data Service?
Asked Answered
S

4

10

I am currently running IE8 and am doing some testing with WCF data services. When I make a call to one of my collections in the browser I get the

"You are viewing a feed that contains frequently updated content..."

message and none of the XML is displayed because it must not understand the Atom content element. However I can easily make this same RESTful call in Chrome or even use Fiddler and see the repsonse just fine.

Is there some reason IE cannot parse the XML returned from my WCF data service, or setting I can change to view it directly? I obviously have work-arounds so this isn't a critical issue but it would help if I have to use IE to view the response.

Thanks!

Straightforward answered 26/4, 2012 at 20:56 Comment(0)
T
17

If you want to view in IE8 the XML, click

Tools > Internet Options.

  1. Tools > Internet Options.
  2. Select the Content Tab
  3. Under Feeds and Web Slices, select Settings
  4. Under Advance section untick Turn on Feed reading view

If you now review your OData page, the feed viewer will not be showing, but the data will be displayed in XML.

Tubulure answered 3/1, 2013 at 16:9 Comment(2)
This after returning to this issue was the best 'work around' to get OData to display properly in IE.Straightforward
Also worked in IE10 for me but had to restart the browser firstCaruncle
S
1

IE 8 and 9 just do not support displaying the OData - Atom Pub feed output. In IE9, the following explanation is provided:

Internet Explorer does not support this feed format.

Supported feed formats

  • ATOM 0.3, 1.0
  • RSS 0.91, 0.92
  • RSS 1.0
  • RSS 2.0

However, there are several easy ways to still view the output from the DataService RESTful call:

  1. View the pages's source in IE. Guess what the output is there!
  2. Use Fiddler to inspect the response.
  3. Use another browser like Chrome and the response will be output directly in the browser.

Maybe IE 10 will have better support of displaying and supporting a feed based on a protocol (OData) created by the very people that created and own IE: Microsoft.

Straightforward answered 11/5, 2012 at 18:47 Comment(0)
M
0

Make sure you call

response.setCharacterEncoding("text/xml;charset=utf-8");

or the equivalent.

Mckellar answered 26/4, 2012 at 21:4 Comment(1)
Could you add some specifics as to where exactly I inject this code? Right now I just have a generic data service with the 'InitializeService' method.Straightforward
O
0

You need to disable feed reading view: http://blogs.msdn.com/b/darrenliu/archive/2011/01/26/turn-rss-feed-reading-view-off.aspx.

I'm having the opposite problem, Chrome won't show the raw XML anymore for me (I swear it used to).

Octosyllabic answered 17/8, 2012 at 19:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.