This is pretty much the reason why I started this blog. I regularly find an article to help with a particular coding problem I’m having. The really frustrating thing is having the problem (or a similar one) a second time and not being able to google up the article again!
Which is what happened last night when I recieved a “Input string was not in a correct format” when deserializing the response from a flickr method call. Something had changed in the XML I was receiving from flickr, which caused a problem when attempting to deserialize the XML into a class. Here is a handy article that explains what is exactly going on when you deserialize an object:
Troubleshooting Common Problems with the XmlSerializer.
The last section ‘Debugging Serialization Code’ shows how you can grab the dynamically generated serialization classes, and step into them to find where an error is occurring.
Post a Comment