解决用Remoting调用远程对象时的超时问题

 
问题症状:
在使用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
 
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值