Search code examples
c#mobile-emulator

Win Mobile 6.5.3 Emulator cannot connect to Internet


Environment: Windows Mobile 6.5.3 Professional VGA Emulator

In the Tools->Device Emulator Manager, I connected to the emulator and cradled the device (the icon to the left changed from a green arrow to a network connection).

I am attempting to access Web Services through a Proxy. In the Windows 7 Professional desktop Windows Application environment, I can access the Web services; in the emulator (the step before I test on the device - MC75A) I get the following:

_HResult        -2146233079                                     int
_innerException null                                            System.Exception
_message        "Could not establish connection to network."    string
_methodDescs    {System.IntPtr[19]}                             System.IntPtr[]
HResult         -2146233079                                     int
InnerException  Could not evaluate expression                   System.Exception
Message         "Could not establish connection to network."    string
StackTrace
   at System.Net.HttpWebRequest.finishGetResponse()
   at System.Net.HttpWebRequest.GetResponse()
   at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
   at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.doInvoke(String methodName, Object[] parameters, WebClientAsyncResult asyncResult)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at MobilePOS.WebReference.Service.FetchNewSession(String OperatorCode, String Password)
   at MobilePOS.TelechargeProxy.FetchNewSession()
   at MobilePOS.Username_Password.fetch_new_session(String user_name, String password)
   at MobilePOS.Username_Password.user_valid(String user_ID, String password)
   at MobilePOS.Login.quick_login_BUT_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.ButtonBase.WnProc(WM wm, Int32 wParam, Int32 lParam)
   at System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam)
   at Microsoft.AGL.Forms.EVL.EnterModalDialog(IntPtr hwnModal)
   at System.Windows.Forms.Form.ShowDialog()
   at MobilePOS.Mobile_POS.Mobile_POS_Dispatcher()
   at MobilePOS.Program.Main()

m_Response      null                                            System.Net.WebResponse
m_Status        ConnectFailure                                  System.Net.WebExceptionStatus
Response        Could not evaluate expression                   System.Net.WebResponse
Status          ConnectFailure                                  System.Net.WebExceptionStatus

At the suggestion of a colleague, I attempted to access www.google.com. The results were

Cannot connect with current connection 
settings. To change your connection settings,
tap Settings.

When I tap settings, I am given

My ISP
Add a new modem connection
My Work Network
Add a new modem connection
Add a new VPN server connection
Set up my proxy server

I tried File->Configure->Network and checked the Enable NE2000.... After a reset (soft) nothing changed.

At this point I am lost.

Any help would be appreciated.

TIA

Gus


Solution

  • After an inordinate amount of wasted research, we decided to pay Microsoft to answer this question.

    Microsoft stated

    Problem

    When you run the Windows Mobile 6.5 emulator on your desktop TCP/IP packets sent by the emulator are not routed via the VPN software to your corporate network.

    Solution

    The network interface used by the emulator is plugging into the TCP/IP stack at a point lower than that which the VPN application sees hence they are routed to the Internet. By using desktop pass through (WMDC in DMA mode and cradling the emulator in the device manager) the VPN application did see the packets and routed them to the corporate network as required.


    The procedure to follow consists of the following steps:

    1. Start the VPN Client on the Windows machine (the one on which the device emulator executes).
    2. Start Visual Studio and open the solution that uses the VPN.
    3. Set the Target Device (in either Toolbar or Project Properties) to desired emulator.
    4. Click Tools->Connect to Device...
    5. In Connect to Device dialog, highlight the desired emulator in the Devices ListBox and click Connect.
    6. Wait for the connection to succeed and click Close.
    7. Click Tools->Device Emulator Manager...
    8. Maximize the Device Emulator Manager.
    9. Find the emulator you wish to use in the Datastore tree.
    10. If it does not have a green arrow icon in front of its name, right-click on its name and click Connect from the right button context menu.
    11. When the emulator name is prefixed by a green arrow icon, right click on the name and choose Cradle from the right button context menu.
    12. Minimize the Device Emulator Manager window.
    13. The Windows Mobile Device Center window will open. (Close any Windows Mobile Member Center windows that may appear.)
    14. In the Mobile Device Center window, the Connected check mark should be present on the left side under the image of a device.
    15. Click on Connect without setting up your device.
    16. Hover over Mobile Device Settings.
    17. Click on Connection Settings link.
    18. The Connection Settings dialog box opens. Insure that all four check boxes are checked; that the first dropdown has DMA chosen; and that the second dropdown has The Internet chosen. (If there is a proxy executing on the hosting machine, choose Work Network in the second dropdown.)
    19. Click OK to dismiss the Connection Settings dialog box.
    20. Minimize the Windows Mobile Device Center window.

    Debug the application in the usual manner. Hope this helps.

    Gus