WCF 流无法在服务器上运行
我使用 WCF 服务将大文件分块传输到服务器 为此,我参考了这篇文章 http:// /kjellsj.blogspot.com/2007/02/wcf-streaming-upload-files-over-http.html
我已在我的计算机上的 IIS 上配置了我的应用程序。它在这里工作得很好。它允许上传最大 64mb 的文件。但是当我们发布网站时。它只允许最大 30Mb 文件,如果我尝试上传超过该文件,我会收到错误 404 - 找不到资源。
这是我使用过的绑定配置。
<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>
如果我遗漏了任何内容,请向我提出建议,如果需要更多代码,请告诉我
I have used WCF service to transfer large files in chunks to the server
for that i have reference this article http://kjellsj.blogspot.com/2007/02/wcf-streaming-upload-files-over-http.html
I have configured my application on IIS on my machine. Its work fine here. It allows upto 64mb file upload. But when we have published the site. It allows only maximum 30Mb file if i try to upload more than that i got error 404 - resource not found.
Here is the binding config i have used.
<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>
Please suggest to me if I am missing anything and if required more code please let me know
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否在您的网络服务器上调整了最大上传大小?
进入目标应用的“请求过滤”,打开该功能,在右侧选择“编辑功能设置”,在对话框中选择大于 30000000(默认)的大小。
如果您在卡西尼岛托管的本地盒子上,或者您的本地盒子有不同的限制,则可能会发生这种情况。
On your webserver did you adjust the maximum upload size?
Goto "Request Filtering" for the target app, Open the feature, on the right side choose "Edit Feature Settings", in the dialog select a size larger than 30000000 (the default).
If on your local box you were hosting in Cassini, or your local box had different limits this might occur.