How do I force a specific connection using ConnectionManager?

Last post 12-10-2008 15:48 by mlindley. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 12-10-2008 15:13

    How do I force a specific connection using ConnectionManager?

    I have an issue where a device has a valid GPRS connection available but is plugged into a Ethernet dock that uses USB Connections.  The USB connection makes the device think that it has a Network Card connection even if there is no ethernet cord plugged into the dock itself.  When this happens, even though I have a valid GPRS connection available the connection attempts fail because it tries to use the (invalid) Network Card connection.

    I have attempted to use the OpenNETCF.Net.ConnectionManager to remedy this, but it's not working how I suspected. Using a combination of the Connectionmanager.Connect() method and the .Net.NetworkInformation.Ping.Send() method, I can accurately determine if the Network Card connection is actually a valid internet connection, but when I tell the .Connect() routine to use the GPRS connection it still fails.

     How can I force the application to use a specific connection for the entire life of that application regardless of any other connections that may or may not be available?

  • 12-10-2008 15:48 In reply to

    Re: How do I force a specific connection using ConnectionManager?

    Said a little more simply, I am able to successfully establish a connection using the ConnectionManager, but how do I tell my program to use that connection exclusively?  I feel like I'm missing one simple but important step beyond:

    m_manager.Connect(connGuid, false, ConnectionMode.Synchronous); 

    Ping ping = new Ping();
    PingReply pReply = ping.Send(www.website.com);

Page 1 of 1 (2 items)