如何避免超时错误,同时调试在Visual Studio 2008的Web服务

如何避免超时错误,同时调试在Visual Studio 2008的Web服务

问题描述:

我使用一个控制台应用程序来调用Web服务方法,我用在VS2008调试器逐步执行代码。

I am using a console application to call web service methods and I am stepping through the code using the debugger in vs2008.

有时候,我需要停下来思考一些事情,以及比较数据。不说话时,短短几分钟,在这一点上出了Web服务时代,我怎样才能避免这种情况,使Web服务不出来时间在所有。

Sometimes I need to stop and think about things, and compare values. Not talking hours, just a few minutes, at this point the web service times out, how can I avoid this, so that the web service does not time out at all.

感谢您

好了,现在认真的回答,发现时间:

Ok, now a serious answer, found at:

http://bytes.com/groups/net-web-services/628561-increase-default-webservice-timeout-globally


  1. 增加 超时 网络服务代理的属性。

  1. Increase the Timeout property of the web-service-proxy.

MyWebServ obj = new MyWebServ();
obj.Timeout = -1; // -1 for forever otherwise in milliseconds


  • 增加HTTP运行时标签的超时值在ASP.NET
    project./app.config的网络配置如果Web应用程序的消费者在Windows中的http

  • Increase the timeout value in http-runtime tag in web-config of ASP.NET project./app.config if the web consumer application is Windows.

    增加超时值-runtime标签Web服务
    项目的网络配置。

    Increase the timeout value in http-runtime tag in web-config of Web Services project.