2010-10-07 48 views
1

我用下面我上傳服務的綁定配置,定製MTOM綁定和最大上傳大小

<binding name="FileUploadSTSBinding"> 
      <security authenticationMode="UserNameOverTransport" 
        requireDerivedKeys="false" 
        keyEntropyMode="ServerEntropy" 
        requireSecurityContextCancellation="false" 
        requireSignatureConfirmation="false"> 
      </security> 
      <mtomMessageEncoding/> 
      <httpsTransport 
      transferMode="Streamed" 
      maxReceivedMessageSize="2147483647"/> 
     </binding> 

但有了這個設置,我不能上傳大文件,如超過1MB,服務器迴應是不好的要求。

有什麼想法?

回答

0

您還需要設置maxRequestLength屬性以使上載工作。它可以在這裏的web.config文件在這裏找到:

<configuration> 
    <system.web> 
     <httpRuntime> 

檢查IIS應用程序池標識具有寫入temp文件夾,以便能夠暫時存儲輸入數據的權利。

+0

我已經設置了maxRequestLength屬性的最大值,但它仍然不起作用。每當我嘗試上傳大文件時,服務器都會返回錯誤的請求。 – blue 2010-10-08 12:08:39

+0

你如何主辦服務? – 2010-10-08 12:25:13

+0

它託管在IIS和Windows 2003服務器上。我已驗證應用程序池標識有權存儲數據。綁定中缺少任何設置? – blue 2010-10-08 13:47:47