WebService-Timeout does not work?

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
 
B

Ben

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
 
S

Sven Rutten

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
 

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