views:

20

answers:

1

I'm working with ASP.Net web services and am having a problem with a long-running process that takes about 5 minutes to complete, and it's timing out. To fix this, I was able to set the executionTimeout on the server's web.config to 10 minutes, and then set the .Timeout property on the Web Service object to approximately 9 minutes. Now, I'm worried that this may possibly cause some other web service calls to sit there for 10 minutes before they time out rather than the previous 90-100 seconds. I know the default on the client side is 100 seconds, but wasn't sure if updating the server's timeout setting would affect this.

Bottom line is - Is it safe to update the server's timeout setting to a long amount like 10 minutes, and rely on the default timeout on the client, or could this end up causing some problems?

Thanks!

+2  A: 

Hi,

The web is not supposed to work like this. If you have a long running process, you should call it in a new thread and post the answer after the page has finish loading on the client side (either with a callback or by querying the server-side every x minutes to check if the process has finished). This way you avoid timeouts and the user gets their page (even incomplete) in a user-friendly time. This is important because if the user does not get their page in a reasonable time, they will be unhappy and try to reload the page (and maybe restart your process...).

GôTô
This is not a web page, it's a Windows Form app calling a web service.
Shawn Steward
Ok, I didn't see that. Anyway, I don't think you should wait ten minutes for an answer. Suppose you have a short network outage, you'd loose your result and would be forced to run the process again. You should definitely call the webservice to start the process, keep the result somewhere in your webservice and call it again to ask for a result.
GôTô
Thanks G, I agree... that solution would still work well for this environment. I was just hoping to find a quick answer to fix this in the meantime until we could implement a new model.
Shawn Steward