
WebRequest.Create() in System.Net;
My code is given below IN THE END.
When i try to access the webpage i get the error as "The remote server
returned an error : (407) Proxy Authentication required."
I am on a network using OS as winnt 4.0 and i do have rights to access
the internet (although i have to enter details in 'Tools->Internet
options->Connection->Lan Setting->proxy server'
CODE
=====
try
{
......
WebRequest WReq=WebRequest.Create(" http://www.*-*-*.com/ ");
WebResponse WResp = WReq.GetResponse();
// get the stream of data
StreamReader sr = new
StreamReader(WResp.GetResponseStream(),Encoding.ASCII);
string strTemp = "";
while ((strTemp = sr.ReadLine()) != null)
{
System.Console.WriteLine(strTemp + "\r\n");
System.Console.WriteLine("Code written");
}
.....
====