R
Roman Mellenberger
Our application is running on windows mobile 2005 on a Symbol MC70
with .net compact framework 2.0 SP2. Since a few days I have strange
troubles connecting to the internet via GPRS:
- If I connect manually to GPRS and then start the application
everything runs just fine
- If the application forces the connection itself (for example via web
request) GPRS connection will be established but all further request
from the app fail. If i go to the Internet explorer application,
leaving my application running and request the same URL there is also
no problem.
(Connecting via ActiveSync runs fine at all)
Here is the code i am using to force the connection in the app:
// Try to get answer
try
{
WebRequest request = WebRequest.Create(uri); //URI =
http://xx.xxx.xxx.xx/test (xx is an official IP address)
request.Timeout = 8000;
HttpWebResponse response =
(HttpWebResponse)request.GetResponse();
if (response.StatusCode == HttpStatusCode.OK)
{
// Return result
return 1;
}
else
{
CUtil.Log("CCommWatcher.HomeConnectCheck", "6",
string.Format("Could not connect to home server URI:{0} ",
uri.ToString()), CUtil.logLevel.information);
return 0;
}
}
catch (Exception ex)
{
CUtil.Log("CCommWatcher.HomeConnectCheck", "7",
string.Format("Could not connect to home server URI:{0} Exception{1}",
uri.ToString(), ex.ToString()), CUtil.logLevel.information);
return 0;
}
Here is the error message I get:
System.Net.WebException: Es kann keine Fehlermeldung angezeigt werden,
da die optionale Ressource der Assembly, die die Fehlermeldung
enthält, nicht gefunden wurde.__bei
System.Net.HttpWebRequest.finishGetResponse()__bei
System.Net.HttpWebRequest.GetResponse()__bei
InfoResearchBern.LTT.Comm.CCommWatcher.HomeConnectCheck()__bei
InfoResearchBern.LTT.Comm.CCommWatcher.HomeConnection()__bei
InfoResearchBern.LTT.Comm.CCommWatcher.CheckStatusAll()__bei
InfoResearchBern.LTT.Comm.CCommWatcher.CommunicationThread()__
Is there any suggest?
Best regards
Roman
with .net compact framework 2.0 SP2. Since a few days I have strange
troubles connecting to the internet via GPRS:
- If I connect manually to GPRS and then start the application
everything runs just fine
- If the application forces the connection itself (for example via web
request) GPRS connection will be established but all further request
from the app fail. If i go to the Internet explorer application,
leaving my application running and request the same URL there is also
no problem.
(Connecting via ActiveSync runs fine at all)
Here is the code i am using to force the connection in the app:
// Try to get answer
try
{
WebRequest request = WebRequest.Create(uri); //URI =
http://xx.xxx.xxx.xx/test (xx is an official IP address)
request.Timeout = 8000;
HttpWebResponse response =
(HttpWebResponse)request.GetResponse();
if (response.StatusCode == HttpStatusCode.OK)
{
// Return result
return 1;
}
else
{
CUtil.Log("CCommWatcher.HomeConnectCheck", "6",
string.Format("Could not connect to home server URI:{0} ",
uri.ToString()), CUtil.logLevel.information);
return 0;
}
}
catch (Exception ex)
{
CUtil.Log("CCommWatcher.HomeConnectCheck", "7",
string.Format("Could not connect to home server URI:{0} Exception{1}",
uri.ToString(), ex.ToString()), CUtil.logLevel.information);
return 0;
}
Here is the error message I get:
System.Net.WebException: Es kann keine Fehlermeldung angezeigt werden,
da die optionale Ressource der Assembly, die die Fehlermeldung
enthält, nicht gefunden wurde.__bei
System.Net.HttpWebRequest.finishGetResponse()__bei
System.Net.HttpWebRequest.GetResponse()__bei
InfoResearchBern.LTT.Comm.CCommWatcher.HomeConnectCheck()__bei
InfoResearchBern.LTT.Comm.CCommWatcher.HomeConnection()__bei
InfoResearchBern.LTT.Comm.CCommWatcher.CheckStatusAll()__bei
InfoResearchBern.LTT.Comm.CCommWatcher.CommunicationThread()__
Is there any suggest?
Best regards
Roman