【发布时间】:2013-02-26 11:37:14
【问题描述】:
我有一个 WCF 服务,它有一个非常耗时的方法,将大数据文件上传到“azure table storage”。
我在客户端运行时设置超时如下:-
binding = new BasicHttpBinding();
binding.CloseTimeout = TimeSpan.FromMilliseconds(2147483647.0);
binding.OpenTimeout = TimeSpan.FromMilliseconds(2147483647.0);
binding.ReceiveTimeout = TimeSpan.FromMilliseconds(2147483647.0);
binding.SendTimeout = TimeSpan.FromMilliseconds(2147483647.0);
我的 web.config 的超时设置如下:-
<bindings>
<basicHttpBinding>
<binding maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" sendTimeout="22:30:00" receiveTimeout="22:30:00" openTimeout="22:30:00" closeTimeout="22:30:00" maxBufferSize="2147483647">
<readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxNameTableCharCount="2147483647" maxStringContentLength="2147483647" />
</binding>
</basicHttpBinding>
</bindings>
我在 VS 2012 中运行我的代码,我看到的问题是文件上传方法在 60 分钟后崩溃,出现未处理的 CommunicationException:远程服务器返回错误:NotFound。如果我按 F5,则上传继续并完成。此时崩溃出现在Reference.cs文件中:-
public void EndFileUploadMethod(System.IAsyncResult result) {
object[] _args = new object[0];
base.EndInvoke("FileUploadMethod", _args, result);
【问题讨论】: