Dear Madam/Sir,
I am using N-Tire application and for SOA using WCF-wsHttpBinding for all tires.
There is wizward type application and all page data are getting saved in xml file.
When submitting the the finish button, the data is going to Data Layer through BLayer. There is add more concept is the pages. If the xml file is less than 8 KB it is going well, but when exceeding this showing following error. Kindly help.
The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:objApply. The InnerException message was 'There was an error deserializing the object of type DARS_BAL.DataLayerService.Apply. 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. Line 190, position 32.'. Please see InnerException for more details.
My Web.config setting is:
openTimeout="00:05:00" receiveTimeout="00:50:00" sendTimeout="00:05:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text"
textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
maxBytesPerRead="65536" maxNameTableCharCount="2147483647" />
enabled="false" />
realm="" />
algorithmSuite="Default" />
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IBusinessService"
contract="BlayerService.IBusinessService" name="WSHttpBinding_IBusinessService" behaviorConfiguration="DARS_EP_Behavior">
Waiting for your favourable replay.
Regards,
Ranjan Pati
07735598795
7 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsForums
Top experts
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Mar 23, 2014, 11:12 PM EDT
Make sure that your
For example,
And the endpoint,
ranjan pati9 reputationPosted Mar 23, 2014, 11:39 PM EDT
Thanks Jaganathan for your replay,
I have used this, but the error is coming again.
You can also find out in my question that, i have used "WSHttpBinding_IBusinessService" as my bindng name, endpoint configuration.
Regards,
Ranjan Pati
ranjan pati9 reputationPosted Mar 24, 2014, 12:05 AM EDT
This is working fine if the XML file contains data upto 8KB.
Showing error when reach to 9 KB.
Waiting for your reply.
Regards,
Ranjan Pati
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Mar 24, 2014, 2:11 AM EDT
Are you using XmlReader?
ranjan pati9 reputationPosted Mar 24, 2014, 2:41 AM EDT
I am reading that xml file content and setting it to a string attribute of a ClassObject, and sending the object to BusinessLayer.
Example:
string strXml="xml file content".
ClassParam objCls=new ClassParam();
objCls.XMLFile=strXml;
and sending it to BAL.
Regards,
Ranjan Pati
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Mar 24, 2014, 3:16 AM EDT
Both the client and server should be configured to send & accept the xml content more than 8KB.
maxBufferSize="2147483647" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647">
maxNameTableCharCount="16384" />
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IMyService"
contract="MyWcfServiceReference.IMyService" name="BasicHttpBinding_IMyService" />
The above configuration should be both the client side [web.config] & server side [config of service]
ranjan pati9 reputationPosted Mar 24, 2014, 8:44 PM EDT
Good morning.
I have implemented the above points in my config files. But again getting this error.
Is it required IIS configuration to increase the request content length ?
I thing my config files setting are getting suppress and are not effective.
Wating for your reply.
Regards,
Ranjan Pati