0

この問題が何度も提起されていることは知っていますが、すべてのコードには異なる答えがあります。50K を超えるファイルを Web サービス ストリームにアップロードしようとしています。以下は私の設定です。すべてを試しましたが、それでも 400 Bad request が返されます。何か案は ??

<?xml version="1.0"?>
<configuration>
    <system.net>
        <defaultProxy>
            <proxy
            usesystemdefault = "false"
            proxyaddress="Address"
            bypassonlocal="false"/>
        </defaultProxy>
    </system.net>
    <connectionStrings>

    </connectionStrings>
    <appSettings>


    </appSettings>
    <system.web>
        <compilation targetFramework="4.0" debug="true" />
        <authentication mode="None"/>
        <httpRuntime maxRequestLength="64000000"/>
    </system.web>

    <system.serviceModel>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true">
        </serviceHostingEnvironment>
        <standardEndpoints>
            <webHttpEndpoint>
                <standardEndpoint name="" helpEnabled="true" crossDomainScriptAccessEnabled="true" automaticFormatSelectionEnabled="true" />
            </webHttpEndpoint>
        </standardEndpoints>
        <behaviors>
            <endpointBehaviors>
                <behavior name="webHttpBehavior">
                    <webHttp />
                </behavior>
            </endpointBehaviors>
        </behaviors>
        <bindings>

            <webHttpBinding>
                <binding name="webHttpBindingWithJsonP" crossDomainScriptAccessEnabled="true" />

            </webHttpBinding>
            <basicHttpBinding>
                <binding maxBufferSize="64000000" maxReceivedMessageSize="64000000" maxBufferPoolSize="64000000">
                    <readerQuotas maxDepth="64000000" maxStringContentLength="64000000" maxArrayLength="64000000" maxBytesPerRead="64000000" />
                    <security mode="None"/>
                </binding>
            </basicHttpBinding>
        </bindings>

        <services>
            <service name="myService">
                <endpoint address="" binding="webHttpBinding"
                          bindingConfiguration="webHttpBindingWithJsonP" contract="IAllatusService"
                          behaviorConfiguration="webHttpBehavior"/>
            </service>
        </services>

    </system.serviceModel>


    <system.webServer>
        <modules runAllManagedModulesForAllRequests="true" />
    </system.webServer>
</configuration>
4

0 に答える 0