Bug 24676 - XmlSyndicationContent.ReadContent fails to deserialize content
Summary: XmlSyndicationContent.ReadContent fails to deserialize content
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: WCF assemblies ()
Version: 3.2.x
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2014-11-19 14:13 UTC by josh.gehman
Modified: 2017-09-06 16:55 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Code exposing issue (2.15 KB, text/plain)
2014-11-19 14:13 UTC, josh.gehman

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 24676 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description josh.gehman 2014-11-19 14:13:11 UTC
Created attachment 8809 [details]
Code exposing issue

When reading in ATOM XML that contains a XML content, XmlSyndicationContent.ReadContent fails to deserialize content correctly.  The failure to deserailize does not present itself as an exception, all of the data in the deserialized object are the default values for the data type.

I have determined a work-around for using XmlSyndicationContent.ReadContent
1) Use XmlSyndicationContent.GetReaderAtContent
2) Call read on the returned XmlDictionaryReader to move it into the correct position
3) Then provide the reader to DataContractSerializer.ReadObject

Output of the program when running in .NET

XmlSyndicationContent.ReadContent: 1234
Workaround: 1234

Output of the program when running in Mono

XmlSyndicationContent.ReadContent: 0
Workaround: 1234