System.Net.WebException: The operation has timed-out again

A

arun.hallan

I know this has been asked umpteen times but i cant find an answer to
my problem.

Very simply, i have a GUI which is trying to call a webservice. The
webservice may take any time from 5mins to 30mins (or more). However
after 2mins i get the following error:

System.Net.WebException: The operation has timed-out

The webservice doesnt return anything. I tried the whole thing with the
method i'm calling returning a boolean, but the error still occurs.

This is an issue with the GUI timing out calling the webservice - as
the underlying webservice still runs in the background.

Anyone come across this and know how to solve?
 
V

Vadym Stetsyak

Hello, (e-mail address removed)!

ah> This is an issue with the GUI timing out calling the webservice - as
ah> the underlying webservice still runs in the background.

You can increase synchronous call timeout.
Set Timeout property of your web service stub to do this.

Or use async call via BeginXXX/EndXXX

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 
D

Dan Normington

I think this is the web service actually timing out. There is a setting in
the web.config file of the web service.

<httpRuntime executionTimeout="1000" />

The timeout is measured in seconds, you may want to see what works best for
you.
 
A

arun.hallan

I've already got the following tag in my web.config

<httpRuntime
maxRequestLength="1048576"
executionTimeout="3600"
/>


And the webservice carries on running while the GUI times out and
crashes.
 
J

John Kievlan

If you have a proxy object for the web service, set the
serviceproxy.Timeout property to the desired timeout, in milliseconds.
You can set it to System.Net.Threading.Timeout.Infinite to prevent the
proxy from timing out at all.
 

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

Top