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 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
ranjan patiPosted Mar 25, 2014, 12:44 AM
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
Jaganathan BantheswaranPosted Mar 24, 2014, 7:16 AM
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 patiPosted Mar 24, 2014, 6:41 AM
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 BantheswaranPosted Mar 24, 2014, 6:11 AM
Are you using XmlReader?
ranjan patiPosted Mar 24, 2014, 4:05 AM
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
ranjan patiPosted Mar 24, 2014, 3:39 AM
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
Jaganathan BantheswaranPosted Mar 24, 2014, 3:12 AM
Make sure that your
For example,
And the endpoint,