Unable to override default ReaderQuotas.MaxBytesPerRead setting for WCF-Custom transport

Home Page Forums BizTalk 2004 – BizTalk 2010 Unable to override default ReaderQuotas.MaxBytesPerRead setting for WCF-Custom transport

Viewing 1 reply thread
  • Author
    Posts
    • #22950

      I configured a send port using WCF-BasicHttp transport. I received the following error:

      The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation ‘SubmitQuery’. The ‘maximum bytes per Read operation’ quota (4096) has been exceeded while reading XML data. Long element start tags (consisting of the element name, attribute names and attribute values) may trigger this quota. This quota may be increased by changing the MaxBytesPerRead property on the XmlDictionaryReaderQuotas object used when creating the XML reader.

      I subsequently switched to WCF-Custom transport in order to configure the ReaderQuotas.MaxBytesPerRead setting. It seems as if the setting uses the default value of 4096 regardless of the value that I provide. It has been identified as a known issue by Microsoft (http://technet.microsoft.com/en-us/library/bb246060(BTS.10).aspx.) Is there a work-around or fix for this issue? Thanks.

    • #25944

      This can be fixed easily by adding below in configuration file

      <service behaviorConfiguration="UserManagerRestfulService">

      <endpoint binding="webHttpBinding"

      bindingConfiguration="abc"   />

      <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />

      </service>

      <webHttpBinding>

      <binding name="abc" closeTimeout="00:25:00" openTimeout="00:25:00"

       receiveTimeout="00:25:00" sendTimeout="00:25:00" maxBufferSize="2147483647"

       maxReceivedMessageSize="2147483647" transferMode="Streamed" />

      <binding name="BasicHttpBinding_Streamed" closeTimeout="00:10:00"

                         openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"

                         allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"

                         maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"

                         transferMode="Buffered"

                         useDefaultWebProxy="true">

      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"

      maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />

      </binding>

      </webHttpBinding>

      in reader quotas u can specify the length u need.

      Regards,

      Muhammad Wasim [email protected]

      Zigron Pakistan

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.