C# code to Check IE Proxy Settings
private static void CheckIEProxySettings()
{
string strFileURL = "http://programmersvision.blogspot.in";
HttpWebRequest WebReqt = (HttpWebRequest)HttpWebRequest.Create(strFileURL);
WebProxy WP = new WebProxy(WebReqt.Proxy.GetProxy(new Uri(strFileURL)));
WP.Credentials = CredentialCache.DefaultCredentials;
Console.WriteLine(WP.Address);
// or use this method
//CheckForProxy(new Uri("http://http://programmersvision.blogspot.in"));
}
private static void CheckForProxy(Uri resource)
{
WebProxy proxy = (WebProxy)WebProxy.GetDefaultProxy();
Uri proxyUri = proxy.GetProxy(resource);
if (proxyUri == resource)
{
Console.WriteLine("There is no proxy for {0}", resource);
}
else
{
Console.WriteLine("Proxy for {0} is {1}", resource, proxyUri.ToString());
}
}
{
string strFileURL = "http://programmersvision.blogspot.in";
HttpWebRequest WebReqt = (HttpWebRequest)HttpWebRequest.Create(strFileURL);
WebProxy WP = new WebProxy(WebReqt.Proxy.GetProxy(new Uri(strFileURL)));
WP.Credentials = CredentialCache.DefaultCredentials;
Console.WriteLine(WP.Address);
// or use this method
//CheckForProxy(new Uri("http://http://programmersvision.blogspot.in"));
}
private static void CheckForProxy(Uri resource)
{
WebProxy proxy = (WebProxy)WebProxy.GetDefaultProxy();
Uri proxyUri = proxy.GetProxy(resource);
if (proxyUri == resource)
{
Console.WriteLine("There is no proxy for {0}", resource);
}
else
{
Console.WriteLine("Proxy for {0} is {1}", resource, proxyUri.ToString());
}
}
WOW!! terribly informative web log and helpful techniques. Please visit this web site if you wish a lot of detail.
ReplyDeleteaccess BitSnoop in UK
very nice and helpfull article.The translation service is really very helpful to me.
ReplyDeleteaccess FileCrop in UK