2012-06-26 93 views
1

您好我已經構建了一個簡單的WCF應用程序,用於從移動應用程序來回查詢數據。 其他一切工作正常,但是當我嘗試上傳大型二進制視頻上傳給了我奇怪的錯誤,我能成功上傳二進制流高達3-4 MB,但更大的比 我收到以下錯誤隨機Restful WCF的可伸縮性問題

之一

1.

<html> 

    <BODY> 
<FONT face="Helvetica"> 
<big><strong></strong></big><BR> 
</FONT> 
<blockquote> 
<TABLE border=0 cellPadding=1 width="80%"> 
<TR><TD> 
<FONT face="Helvetica"> 
<big>Network Error (tcp_error)</big> 
<BR> 
<BR> 
</FONT> 
</TD></TR> 
<TR><TD> 
<FONT face="Helvetica"> 
A communication error occurred: "" 
</FONT> 
</TD></TR> 
<TR><TD> 
<FONT face="Helvetica"> 
The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time. 
</FONT> 
</TD></TR> 
<TR><TD> 
<FONT face="Helvetica" SIZE=2> 
<BR> 
For assistance, contact your network support team. 
</FONT> 
</TD></TR> 
</TABLE> 
</blockquote> 
</FONT> 
</BODY> 
</html> 

2.

<html> 

<body> 

<div id="header"><h1>Server Error</h1></div> 

<div id="content"> 

<div class="content-container"><fieldset> 

    <h2>404 - File or directory not found.</h2> 

    <h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.</h3> 

</fieldset></div> 

</div> 

</body> 

</html> 

這裏是我的web.config

<?xml version="1.0"?> 
<configuration> 
    <system.webServer> 
    <security> 
     <requestFiltering> 
     <requestLimits maxAllowedContentLength="2147483648" /> 
     </requestFiltering> 
    </security> 
    </system.webServer> 
    <system.web> 
    <compilation debug="true" targetFramework="4.0" /> 
    </system.web> 
    <system.serviceModel> 
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/> 
    <bindings> 
     <webHttpBinding> 
     <binding transferMode="Streamed" maxBufferSize="5242880" maxReceivedMessageSize="2147483647" openTimeout="05:25:00" closeTimeout="00:25:00" sendTimeout="00:25:00" receiveTimeout="0:25:00" 
       name="webBinding" 
     /> 
     </webHttpBinding> 
    </bindings> 
    <services> 
     <service behaviorConfiguration="RestBehavior" name="EyePlots.Videos"> 
     <endpoint address="" behaviorConfiguration="web" binding="webHttpBinding" bindingConfiguration="webBinding" 
      contract="EyePlots.IVideos" /> 
     </service> 
</services> 
    <behaviors> 
     <endpointBehaviors> 
     <behavior name="web"> 
      <webHttp /> 
     </behavior> 
     </endpointBehaviors> 
     <serviceBehaviors> 
     <behavior name="RestBehavior"> 
      <serviceMetadata httpGetEnabled="true" /> 
      <serviceDebug includeExceptionDetailInFaults="true" /> 
      <serviceThrottling maxConcurrentCalls="100" 
    maxConcurrentInstances="100" maxConcurrentSessions="100" /> 
     </behavior> 
     </serviceBehaviors> 
    </behaviors> 
    </system.serviceModel> 
</configuration> 

它可能是系統的可擴展性問題嗎?如果你們想要,我可以發佈我的代碼片段嗎?謝謝!

回答

2

我覺得4兆是IIS節流。

是否已經設置(IIS7 +)

<system.webServer> 
    <security> 
    <requestFiltering> 
     <requestLimits maxAllowedContentLength="2147483648" /> 
    </requestFiltering> 
    </security> 
</system.webServer> 

這裏有一個上市後一些更多的油門嘗試開放。 WCF problem with uploading large file, hosted in IIS

+0

如果這不是您的問題,請發佈您的配置。 –

+0

我做到了,即使添加了requestLimit也不適合我 – Amrit

+0

添加一個鏈接列出了允許答覆者上傳大文件的更多限制。 –