I have a device on Windows Mobile. The device have an access to the internet via WI-FI. I've tried to make a code to get response via Internet with WebHttpRequest and WebHttResponse.
string url = "http://172.20.24.83:80/ProductRESTService.svc/GetProductList/";
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
req.Method = "GET";
req.ContentType = "application/xml; charset=utf-8";
req.Timeout = 300000000;
req.Headers.Add("SOAPAction", url);
HttpWebResponse response = (HttpWebResponse)req.GetResponse();
It works fine on Emulator. Unfortunately I have an exception:
Could not establish connection to network on the device only
The device can get an access to the internet via browser, but I can't do it via code.
Do you have any ideas?