„Maksymalny limit długości łańcucha znaków (8192) został przekroczony podczas odczytu danych XML” podczas wysyłania ciągu XML do WCF

Pracuję z aplikacją .NET, C #, która zamierza wysłać długi ciąg XML do metody usługi WCF dla dalszej operacji. Gdy moja aplikacja próbuje wysłać ciąg XML do usługi WCF w czasie wykonywania, otrzymuję komunikat o błędzie:

"The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:strProdUserDataXML. The InnerException message was 'There was an error deserializing the object of type System.String. 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 131, position 57.'. Please see InnerException for more details."

Moja strona aplikacji web.config Napisałem „wiążący” i „punkt końcowy” jako:

<binding name="EndPointHTTPGenericPortal" closeTimeout="01:00:00" openTimeout="01:00:00" receiveTimeout="01:00:00" sendTimeout="01:00:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
    <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
    <security mode="None">
    <message clientCredentialType="UserName" algorithmSuite="Default" />
    </security>
    </binding>

    <endpoint address="http://192.168.140.40/WcfGenericPortal_Service/Service1.svc" binding="basicHttpBinding" bindingConfiguration="EndPointHTTPGenericPortal" contract="IService1" name="EndPointHTTPGenericPortal" behaviorConfiguration="Graph" />

Jeśli jakikolwiek organ może mi pomóc w rozwiązaniu tego błędu, będę bardzo zobowiązany. Dziękujemy wszystkim z góry.

questionAnswers(6)

yourAnswerToTheQuestion