Invalid URI: The Uri string is too long Invalid URI: The Uri string is too long xml xml

Invalid URI: The Uri string is too long


the problem is that the xml in your xmlreader.create function should be a uri if the argument is a string.

eg.

XmlReader reader = XmlReader.Create("http://ServerName/data/books.xml", settings);

In your case the xml file is being interpreted as the url and hence it is complaining about the limit.

look at this msdn doc XmlReader.Create Methodfor different overloaded methods..

I am guessing you should use the TextReader one.