WebService-Timeout does not work?

  • Thread starter Thread starter Sven Rutten
  • Start date Start date
S

Sven Rutten

Hello

I am communicating with a webservice from my PPC.
like this:

Dim ws as new ourwebreference.ourfunction
dim result as boolean
result = ws.getinfo(a,b)

That is working correct, but if I have no connection on my device (WLAN
deactivated, GPRS/GSM not in coverage), I want to timeout the request after
15 seconds...

I tried to set ws.timeout to 15000 but that does not work... It keeps trying
to connect for about 30-50 seconds and then I get an error message back. But
30-50 is too long...

What's wrong?

Thanks

Sven
 
Soap timeout probably does not come into it as it has not send a Soap
request , it is probably still trying to set up a TCP connection and
hence is in System.Net code. The 30 seconds is probably the time it
takes to dial .

I dont know your circumstance but IMHO This type of thing is best
handled by a background thread . At worst a dialer should attempt
connection regularly if there is data to upload. If there is no network
then there is no point calling the proxy.

Regards,

Ben
 
Hi

Thanks for your fast answer

Actually I am exactly trying to do this in another thread. That's also
working with a manual timer, but the strange thing is that the function
result = ws.getinfo(a,b) is normally setting up the GPRS-Connection (if no
other is available), but if I put it into a thread it's not :-(

It's really weird...

Sven
 
Back
Top