2

サービスに wshttpbinding を使用しています

<wsHttpBinding>
            <binding name="wsHttpBinding_Windows" maxBufferPoolSize="9223372036854775807" maxReceivedMessageSize="2147483647">
                <readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxStringContentLength="2147483647" maxNameTableCharCount="2147483647"/>
                <security mode="Message">
                    <message clientCredentialType="Windows"/>
                </security>
            </binding>
        </wsHttpBinding>

<behavior name="ServiceBehavior">
                <dataContractSerializer  maxItemsInObjectGraph="6553600"/>
                <serviceThrottling maxConcurrentCalls="2147483647" maxConcurrentInstances="2147483647" maxConcurrentSessions="2147483647"/>
            </behavior>

15Mb のファイルをアップロードしようとすると、以下の EndPointNotFoundException がスローされます。

例外メッセージ:

There was no endpoint listening at "MY SERVICE URL" that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

例外:

The remote server returned an error: (404) Not Found.
4

2 に答える 2

15

この例外を解決するには、WCF 構成のサーバー側に(2) 設定maxRequestLengthを増やす必要があります。maxAllowedContentLengthWCF サービス サーバー側の .config で、次を追加してください。

<system.web>
  <!--Increase 'maxRequestLength' to needed value: 100mb (value is in kilobytes)-->
  <httpRuntime maxRequestLength="102400"/>
</system.web>

<system.webServer>
  <security>
    <requestFiltering>
      <!--Increase 'maxAllowedContentLength' to needed value: 100mb (value is in bytes)-->
      <requestLimits maxAllowedContentLength="104857600" />
    </requestFiltering>
  </security>
</system.webServer>
于 2012-11-13T13:46:56.883 に答える
1

アップロード制限は 2 レベルに設定されています。1 番目はアプリケーションによるもので、2 番目はサーバーによるものです。

あなたのアプリの構成は私には良さそうです。

machine.config ファイルで定義されている IIS 設定を確認します。 これを構成するためのMicrosoft KB 記事を見つけました

これらの任意の場所で値を構成できます。

于 2011-06-17T10:03:25.670 に答える