WCF-Web.config maxReceivedMessageSize

Bin ich Entsendung ein json-Objekt mit viel text.

Unten ist meine aktuelle web.config. Wie sollte ich ändern, ändern Sie die Nachrichtengröße auf post große json?

Dies ist dringend erforderlich, pls Antwort schnell. danke!

<?xml version="1.0"?>
<configuration>
    <appSettings>
        <add key="LogPath" value="\Logs\" />
    </appSettings>
    <connectionStrings>
    </connectionStrings>
    <system.web>
        <httpRuntime maxRequestLength="10000" />
        <compilation debug="true" targetFramework="4.0" />
    </system.web>
    <system.serviceModel>
        <client>
            <endpoint address="http://api.microsofttranslator.com/V2/soap.svc"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_LanguageService"
                contract="TranslatorService.LanguageService" name="BasicHttpBinding_LanguageService" />
        </client>
        <behaviors>
            <serviceBehaviors>
                <behavior name="">
                    <serviceMetadata httpGetEnabled="true" />
                    <serviceDebug includeExceptionDetailInFaults="false" />
                </behavior>
            </serviceBehaviors>
            <endpointBehaviors>
                <behavior name="webby"  >
                    <webHttp/> 
                </behavior>
            </endpointBehaviors>
        </behaviors>
        <bindings>
            <basicHttpBinding>
                <binding name="BasicHttpBinding_LanguageService" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    allowCookies="false" bypassProxyOnLocal="false" 
                    hostNameComparisonMode="StrongWildcard"
                    maxBufferSize="65536" maxBufferPoolSize="524288" 
                    maxReceivedMessageSize="65536"
                    messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
                    useDefaultWebProxy="true">
                  <readerQuotas maxDepth="32" maxStringContentLength="8192" 
                                maxArrayLength="16384"
                                maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                  <security mode="None">
                      <transport clientCredentialType="None" proxyCredentialType="None"
                          realm="" />
                      <message clientCredentialType="UserName" algorithmSuite="Default" />
                  </security>
                </binding>
            </basicHttpBinding>
            <customBinding>
                <binding name="AgricultureTradingWebApp.AgricultureWebService.customBinding0" >
                    <binaryMessageEncoding />
                    <httpTransport />
                </binding>
            </customBinding>
        </bindings>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true"
            multipleSiteBindingsEnabled="true" />
        <services>
            <service name="AgricultureTradingWebApp.AgricultureWebService">
                <endpoint address="" binding="customBinding" bindingConfiguration="AgricultureTradingWebApp.AgricultureWebService.customBinding0"
                      contract="AgricultureTradingWebApp.AgricultureWebService" />
                <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
                <endpoint address="json"
                          binding="webHttpBinding" 
                          contract="AgricultureTradingWebApp.AgricultureWebService"
                behaviorConfiguration="webby"/>
            </service>
        </services>
    </system.serviceModel>
</configuration>
Sind Sie immer Fehler? Sind Sie immer auf dem client (beim Empfang der Antwort) oder auf dem server (beim senden der Anfrage)?
Error bad request. Nachricht begrenzen

InformationsquelleAutor user903772 | 2011-08-20

Schreibe einen Kommentar