Получение исключения - изменение maxArrayLngth

Я получаю исключение при запуске моего кода: System.ServiceModel.Dispatcher.NetDispatcherFaultException

Becuse MaxArrayLength должен быть изменен.

Итак, я добавил readerQuotas в свой App.Config и изменил длину, но все равно получил то же исключение.

   <?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
    </startup>
    <system.serviceModel>
        <bindings>
          <netTcpBinding>
            <binding name="CustomBinding_IRemoteServer"

                     maxBufferPoolSize="2147483647"

                     maxBufferSize="2147483647"

                     maxConnections="2147483647"

                     maxReceivedMessageSize="2147483647"

                     portSharingEnabled="false"

                     transactionFlow="false"

                     listenBacklog="2147483647"
                     >

              <readerQuotas maxArrayLength="18000" maxBytesPerRead="5000" maxDepth="32" maxNameTableCharCount="16387" maxStringContentLength="8192"/>


                </binding>
            </netTcpBinding>       
      </bindings>
        <client>
            <endpoint address="net.tcp://localhost:33726/InControl" binding="customBinding"
                bindingConfiguration="CustomBinding_IRemoteServer" contract="InControlAPI.IRemoteServer"
                name="CustomBinding_IRemoteServer">
                <identity>
                    <servicePrincipalName value="host/Snutt" />
                </identity>
            </endpoint>
        </client>
    </system.serviceModel>
</configuration>

0 ответов

Другие вопросы по тегам