A
Andrew
Hi All
In the .NET Framework is there any way to provide the proxy
authentication the way internet explorer prompts.
I mean when I access the net using internet explorer it asks for the
username and password. I want that when I create a Web-Request it also
prompts for the username and password for the proxy server exactly the
way it asks for the internet explorer.
Presently it just simply gives the error with 407 status code stating
that proxy authentication is required.
The code is as follows:
Uri myUri =new Uri("http://www.google.co.in/");
WebRequest client = WebRequest.Create(myUri);
client.Proxy = System.Net.WebProxy.GetDefaultProxy();
myResponse = client.GetResponse();
data = myResponse.GetResponseStream();
reader = new StreamReader (data);
String str = reader.ReadToEnd ();
Regards
Andrew
In the .NET Framework is there any way to provide the proxy
authentication the way internet explorer prompts.
I mean when I access the net using internet explorer it asks for the
username and password. I want that when I create a Web-Request it also
prompts for the username and password for the proxy server exactly the
way it asks for the internet explorer.
Presently it just simply gives the error with 407 status code stating
that proxy authentication is required.
The code is as follows:
Uri myUri =new Uri("http://www.google.co.in/");
WebRequest client = WebRequest.Create(myUri);
client.Proxy = System.Net.WebProxy.GetDefaultProxy();
myResponse = client.GetResponse();
data = myResponse.GetResponseStream();
reader = new StreamReader (data);
String str = reader.ReadToEnd ();
Regards
Andrew