Restful WCF的可伸缩性问题
您好,我已经建立了一个简单的WCF应用程序,我正在使用它从移动应用程序来回查询数据。 其他一切都很好,但当我尝试上传大型二进制视频上传时,它会给我一个奇怪的错误,我成功地上传了高达3-4MB的二进制流,但比这还要大 我随机得到以下错误之一 一,Restful WCF的可伸缩性问题,wcf,sql-server-2008,iis-7,wcf-data-services,Wcf,Sql Server 2008,Iis 7,Wcf Data Services,您好,我已经建立了一个简单的WCF应用程序,我正在使用它从移动应用程序来回查询数据。 其他一切都很好,但当我尝试上传大型二进制视频上传时,它会给我一个奇怪的错误,我成功地上传了高达3-4MB的二进制流,但比这还要大 我随机得到以下错误之一 一, 网络错误(tcp\U错误) 发生通信错误:“” Web服务器可能已关闭、太忙或遇到其他问题,无法响应请求。您可能希望稍后再试。 如需帮助,请联系您的网络支持团队。 二, 服务器错误 404-找不到文件或目录。 您正在查找的资源可能已被删除、
网络错误(tcp\U错误)
发生通信错误:“”
Web服务器可能已关闭、太忙或遇到其他问题,无法响应请求。您可能希望稍后再试。
如需帮助,请联系您的网络支持团队。
二,
服务器错误
404-找不到文件或目录。
您正在查找的资源可能已被删除、名称已更改或暂时不可用。
这是我的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>
这可能与系统的可伸缩性有关吗?如果你们愿意,我可以发布我的代码片段?谢谢 我认为4兆是个好主意 您是否已设置(IIS7+)
下面是一篇文章,列出了更多的节流阀来尝试打开 如果这不是您的问题,请发布您的配置。添加一个链接,列出允许应答者上载大文件的更多限制。感谢添加
修复了此问题!
<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>
<?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>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2147483648" />
</requestFiltering>
</security>
</system.webServer>