Pergunta

I have a problem with my WCF service config, I get the error: "The formatter threw an exception while trying to deserialize the message .... the maximum string content length quota (8192) has been exceeded....."

So after searching at google i found that i need to set this line in my config file :

<readerQuotas maxStringContentLength="2147483647" />

but when i add it to the web.config, i get the error :

Unrecognized element 'readerQuotas'

what shall i do?!

my binding :

    <bindings>
      <basicHttpBinding>
        <binding name="Stream_Binding" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="Streamed" messageEncoding="Mtom"/>
<readerQuotas maxStringContentLength="2147483647" />
</basicHttpBinding>
    </bindings>
Foi útil?

Solução

readerQuotas node needs to be inside of binding

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top