Question

I'm using this sample code by CodeProject to connect to GPRS in a Windows Mobile in C#.

I tried the code and it works fine. However, sometimes I get a message saying "ConnectionLinkFailed" and I can't connect to GPRS.

I must wait some time in order to being able to connect again. Rebooting doesn't solve the problem either.

Does anyone knows how to avoid this exception?

Thanks for any help!

Was it helpful?

Solution

The MSDN site only states:

CONNMGR_STATUS_CONNECTIONLINKFAILED The connection link was prematurely disconnected.

There is no further description. I assume you have a problem with your provider. Beside from that, I do not rely on Connection Manager (CM) connections. Soemtimes it states a connection is available, but it is not in real as CM uses a cached information.

Normally, for getting a connection, you only have to issue a http request. CM will choose the right connection. Usa of CM API is only usefull if you need to switch between different connections with same destination network. But this i normally not the case, as you will have normally only a WiFi and one GPRS connection to internet and WiFi is selected prior to GPRS (due to costs).

What is the scenario that makes you think you have to use CM?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top