try { WebRequest req = WebRequest.Create(@"http://google.com"); //if (req.Proxy != null) //{ // req.Proxy.Credentials = CredentialCache.DefaultCredentials; //} //string MyProxyHostString = "fsoft-proxy"; //int MyProxyPort = 8080; //req.Proxy = new WebProxy(MyProxyHostString, MyProxyPort); WebResponse resp = req.GetResponse(); Stream strm = resp.GetResponseStream(); StreamReader reader = new StreamReader(strm); string locale = reader.ReadToEnd(); } catch (Exception exp) { MessageBox.Show(exp.Message); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)