我已经使用 WCF 服务将大文件分块传输到服务器,因为我参考了这篇文章http://kjellsj.blogspot.com/2007/02/wcf-streaming-upload-files-over-http.html
我已经在我的机器上的 IIS 上配置了我的应用程序。它在这里工作正常。它允许上传高达 64mb 的文件。但是当我们发布了网站。如果我尝试上传超过 404 错误 - 找不到资源,它只允许最大 30Mb 文件。
这是我使用的绑定配置。
<basicHttpBinding>
<!-- buffer: 64KB; max size: 64MB -->
<binding name="FileTransferServicesBinding" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" transferMode="Streamed" messageEncoding="Mtom" maxBufferSize="65536" maxReceivedMessageSize="67108864">
<security mode="None">
<transport clientCredentialType="None"/>
</security>
</binding>
</basicHttpBinding>
如果我遗漏任何东西,请向我建议,如果需要更多代码,请告诉我