I receive this error when I try to send things to a Webservice with WP7.
The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation '
SubmitMobileData
'. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing theMaxStringContentLength
property on theXmlDictionaryReaderQuotas
object used when creating the XML reader. Line 178, position 21.
I figure its not my web service. Its actually my WP7 trying to serialize the data inside XML. Well my question is how do I set the XmlDictionaryReaderQuotas
.MaxStringContentLength
property in my WP7 app. I know how to set it on the Client of a Desktop App and inside a Webservice. But I CANT set it inside the App.XAML file of a WP7 App.
EDIT: I posted the client.config below. I decided to keep the service address open for those wanting to see about connecting to the service. When this question is hopefully answered, I will remove the wcf connection.
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IMobileUtilities" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://utopiapimp.com/services/MobileUtilities.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IMobileUtilities"
contract="PimpMobileService.IMobileUtilities" name="BasicHttpBinding_IMobileUtilities" />
</client>
</system.serviceModel>