I have some .asmx webservices, imported as service reference on .NET 4.5.
They download a XML string, and than I try to process it with XmlDocument.
Well, now I get this error: The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader
How can I fix this trouble? I am on Visual Studio 2010, tried this, but is WCF, I can’t find that zone.
Tried adding this code before calling a function of the webservice:
XmlDictionaryReaderQuotas myConf = new XmlDictionaryReaderQuotas();
myConf.MaxStringContentLength = 202400;
but nothing changes!
You have to change the MaxStringContentLength from you configuration or when you create the binding. Besides that it has to be the same on the server and client. If not you can send it, but not receive the content.