问题症状:
在使用Remoting方式,调用远程对象时(采用singCall方式),那个远程对象会调用一个程序,而那个程序可以需要3到4分钟才能执行完毕,并返回结果。但在客户端执行调用时,大概执行了二分左右,就报错了。但此时如果你登录到远程的机器上查看进程,被调用的进程仍然在执行,且再等几分钟后,正常结束。分析这应是一个等待超时的问题,可是设了channle的timeout属性为不超时,仍然不起作用。
解决方法:最后在一个同事的帮助下,终于找到解决方法以,在远程对象端的Web.config文件中加入如下的结点:(时间设为360秒=6分钟)
<system.web>
<httpRuntime executionTimeout="360" />
</system.web>
附:这个结点的这个属性的说明:
Optional TimeSpan attribute. Specifies the maximum number of seconds that a request is allowed to execute before being automatically shut down by ASP.NET. This time-out applies only if the debug attribute in the compilation element is False. To help to prevent shutting down the application while you are debugging, do not set this time-out to a large value. The default is "00:01:50" (110 seconds