views:

331

answers:

3

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

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.

Thank you

A: 

This is what I always do: debug quicker.

Natrium
Or just run it again.
Colin
You gotta be kidding right? haha debug quicker - roflol
JL
The questions is how to avoid the problem. To avoid, you need to do my solution. To solve the problem, you need to do Colin's solution.And yes, I was kinda kidding, but thanx for the downvote anyway.
Natrium
+6  A: 

Ok, now a serious answer, found at:

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

[1]Increase the Timeout property of the Web service proxy. MyWebServ obj = new MyWebServ(); obj.Timeout = -1; // -1 for forever otherwise in milliseconds

[2] Increase timeout value in http-runtime tag in web-config of ASP.NET project./app.config if it web consumer application is windows

[3] Increase timeout value in http-runtime tag in web-config of Web Services project.

Colin
+3  A: 

You can turn the timeout off by stopping the application pool from recycling:

In the IIS console, go to the app pool properties and set "Ping Enabled" to false

(hope this helps! - is my first answer on here)

Paul
It appears I can't put a comment anywhere else apparently, so will comment here. Would this solution not ultimately be slightly better as it involves no code changes (or config file changes), so when you deploy it to a live environment there's no risk of accidentally leaving the unlimited timeout in your app?
Paul