I am developing a Windows phone mobile application. I need to send a WebRequest for a specific URL. See below
HttpWebRequest request = (HttpWebRequest)System.Net.WebRequest.Create(@"http://www.test.html");
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
{
if (response.StatusCode == HttpStatusCode.OK)
return true;//site available
else
return false;
}
Obviously, It works well for network without proxy. For network using proxy, I need to add the proxy information along with Webrequest. Since we are doing phone applcaition, We cant hardcode the proxy address in the Webrequest object. How to send the Webrequest where the network is using proxy(from Windows phone application)