I had create a GPRS connection and a VPN connection in the connection manager of a window mobile 5 device. when I manually connect the VPN, it will automatically connect the GPRS first then only connecting the PPTP VPN.
I can use the CMHelper example to auto connect the GPRS connection and I can also modify the CMHelper to connect the VPN using another GUIDDestNet. but when the application connecting the VPN, it does not automatically connect the GPRS first. so connection to the VPN always fails because there is no GPRS connection established before hand unless I manually dial out the GPRS connection first.
Is there any setting or coding need to be added to my CMHelper aplication to enable the GPRS dial out before connecting the VPN connection? or I should modify the CMHelper application to connect the GPRS dial out first, then only connect the VPN connection (2 ConnMgrEstablishConnectionSync)?
I had found the solution which I myself can't really believe it. The solution is enter the server local IP to the Work URL Exceptions and in the cmhelper program's URL path. The wm5 connection manager will automatically dial the GPRS and also the VPN together.
I really need to thanks God for this as the solution really come out as a miracle. I can't find any solution for a week and I had spend two days writing code for dialing two connections one after another. I am quite frustrated and I don't even reallize how and when I input the IP address into the Work URL Exception (I had totally no idea what this Work URL Exception is, "Exception" always mean some error log kind of thing for me) Then suddenly I got the autoconnection through IE. At first I thought IE store the cache for the connection with the URL. After I try and error for few attempt like clear cache, clear history, and search around the connection manager, then only I realize it is because of the Work URL Exception.