Web services 为什么对web服务方法的调用几乎会立即超时?

Web services 为什么对web服务方法的调用几乎会立即超时?,web-services,.net-4.0,windows-server-2003,Web Services,.net 4.0,Windows Server 2003,使用.NET 1.1的此web服务的生产版本不存在此问题。这是在Windows Server 2003上运行.NET 4.0的测试环境上进行的 我收到以下异常时遇到问题: System.Net.WebException: The operation has timed out at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) at System.Net.HttpWebR

使用.NET 1.1的此web服务的生产版本不存在此问题。这是在Windows Server 2003上运行.NET 4.0的测试环境上进行的

我收到以下异常时遇到问题:

    System.Net.WebException: The operation has timed out    
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)    
at System.Net.HttpWebRequest.GetRequestStream()    
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)    
at HTP.RHIO.PIRManager.TargetWS.PIRService.Upload(Transmission t_request)    
at HTP.RHIO.PIRManager.Manager.PIRManager.Upload(Transmission request)
当我的webservice的Upload方法调用另一个webservice的Upload方法时,就会发生这种情况。超时几乎立即发生,大约1/3秒(注意log\u datetime列)

代码:(它在异常输出中记录间隔的行尚未实现,这就是为什么它没有出现在输出中。它应该是默认值interval=60[*1000])

从我的web服务的web.config文件:

<httpRuntime executionTimeout="600" maxRequestLength="2000000"/>

将.Convert.ToInt16可能无法达到您的预期效果。来自

返回值

类型:System.Int16
一个16位有符号整数,等于值中的数字,或如果值为空,则等于0(零)。

如果配置中未设置
realtimeoutseconds
,则将转换为NULL,这将导致零超时

<httpRuntime executionTimeout="600" maxRequestLength="2000000"/>