Timeout when debugging in web service

D

Dale

I am trying to step through a web service call in .Net 2.0 with VS2005. The
application is running in the VS2005 web server, not IIS. The web service
client is a .Net 2.0 console application.

At one call to a long running method (about 20+ minutes in production) the
client throws a timeout exception as described in
http://msdn2.microsoft.com/en-us/library/47096yt2(VS.71).aspx. This happens
about 90 seconds after entering the web service call.

I had initially set the TimeOut value to 3600 - which I still think should
have worked - but following the instructions in the article above, I set the
TimeOut to -1. This had no effect on the problem. I still timeout after
about 90 seconds.

I also set the httpRuntime executionTimeout value to 3600 in my web.config.

Any ideas on how to fix this timeout problem?

Thanks,

Dale
 
D

Dale

Whoops. I need to learn how to read, I guess. The timeout is an
SqlClient.SqlException. I need to set the CommandTimeout on the connection.

I apologize for any wasted time.

Dale
 
A

Andrew Faust

Sounds like you found the solution to the exception you were getting.
However, may I make a design suggestion? If you anticipate a web service
call to take 20 minutes to return a result, could you instead redesign to
make the client submit the request. Have the web service return an
acknowledgement that it would start work. You can then have your client
continuously checking back in (every 30 seconds or so) until the server was
finished.

This method takes a bit more work, but it will be more scalable and less
interuption prone. With your current model you're tying up network
resources on the server. Additionally, if there is any network hiccup in
that 20 minutes you've lost the work and will have to restart with a new
request.
 
D

Dale

That's a good suggestion. Given the opportunity to make a change like that,
I'll definitely do something like that.

Thanks,

Dale

Andrew Faust said:
Sounds like you found the solution to the exception you were getting.
However, may I make a design suggestion? If you anticipate a web service
call to take 20 minutes to return a result, could you instead redesign to
make the client submit the request. Have the web service return an
acknowledgement that it would start work. You can then have your client
continuously checking back in (every 30 seconds or so) until the server was
finished.

This method takes a bit more work, but it will be more scalable and less
interuption prone. With your current model you're tying up network
resources on the server. Additionally, if there is any network hiccup in
that 20 minutes you've lost the work and will have to restart with a new
request.

--
Andrew Faust
andrew[at]andrewfaust.com
http://www.andrewfaust.com


Dale said:
Whoops. I need to learn how to read, I guess. The timeout is an
SqlClient.SqlException. I need to set the CommandTimeout on the
connection.

I apologize for any wasted time.

Dale
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top