views:

141

answers:

2

I write GUI application on c# for .NET compact framework 1.0 SP3 platform that uses web-services to retrieve data from our server.

When I go far away from access point the connection is lost and next web-service call locks up whole application. Every call surround by try{...}catch{...}, but as far as I can see in logs process never returns from locked web-service call.

What is going on?

+1  A: 

What is the timeout of the web service? Have you tried tweaking the timeout?

I would add a Thread.Sleep(5000); in the web service then set the timeout in the client to 2seconds then run with the debugger and make sure that the exception is being caught when it times out. Do this while connected to the network.

Then you'll want to display an error message of some kind if after a certain number of tries the service still times out. Then you'll want to wait for a configurable amount of time before retrying. You'll also want to let the user manually try to reconnect.

Jonathan Parker
A: 

Timeout is set to 10 seconds. There is a record in logs that shows three catched exceptions and then web-service call locks up.

What were the caught exceptions? And you probably want to dispose of your proxy instance after the connection breaks, and get a new one.
John Saunders