.net - Where does one increase maxStringContentLength in order to get WCF to pass large strings? -
okay i've set , tested nice little wcf service. client creates string , passes method on service , service saves file. works small amounts of test data when try it's supposed - pass serialized .net objects - falls over, error
the formatter threw exception while trying deserialize message: error in deserializing body of request message operation maximum string content length quota (8192) has been exceeded while reading xml data. quota may increased changing maxstringcontentlength property on xmldictionaryreaderquotas object used when creating xml reader
so goggle , find maxstringcontentlength property should set on "readerquotas" tag within tag of config file, this:
<readerquotas maxdepth="2147483647" maxstringcontentlength="2147483647" maxarraylength="2147483647" maxbytesperread="2147483647" maxnametablecharcount="2147483647" />
so change it. change on app.config file of client. change on app.config file , web.config file of server. change in app.config file of unit test project. , none of works - keep getting same error.
interesting, , frustratingly, when fired wcfclient.exe have @ service, connected , has @ config file (client.dll.config) gobsmacked find auto-generated file contained none of changes , has reset to:
<readerquotas maxdepth="32" maxstringcontentlength="8192" maxarraylength="16384" maxbytesperread="4096" maxnametablecharcount="16384" />
i have no idea it's getting these values - in entire solution these being set. must using defaults, don't understand why it's using defaults when i've provided custom config files @ both server , client.
can me untangle this?
1) possible endpoint isn't referencing custom binding? post binding , endpoint sections?
2) wcftestclient doesn't use service or client configs set own configuration. you'll need manually edit client.dll.config svcconfigeditor set wcftestclient client binding data before executing service.
you can persist wcftestclient configuration changes if @ tools -> options menu. more information on wcftestclient, check out: http://msdn.microsoft.com/en-us/library/bb552364.aspx
Comments
Post a Comment