all groups > dotnet remoting > august 2005 >
You're in the

dotnet remoting

group:

Getting Error : (407) Proxy Authentication Required.


Getting Error : (407) Proxy Authentication Required. mili
8/4/2005 10:25:01 PM
dotnet remoting:
Hi,
I am using events in .Net remoting Scenario, So server process can invoke
client delegate function by firing the event.

But when my server tries to fire the event, I get the a exception :
System.Net.WebException: The remote server returned an error: (407) Proxy
Authentication Required..

If I disable the proxy setting in internet explorer,then it's working fine.
But How can i achieve this without disabling the proxy setting in internet
explorer.

Thanks

Re: Getting Error : (407) Proxy Authentication Required. Erick Sgarbi
8/5/2005 11:32:54 AM
Can you post some code... from here I can only suggest this:

System.Net.WebProxy proxy = new System.Net.WebProxy("address");
proxy.Credentials = new System.Net.NetworkCredential("user", "password",
"domain");
System.Net.GlobalProxySelection.Select = proxy;




HTH
Erick Sgarbi
www.blog.csharpbox.com



[quoted text, click to view]
Re: Getting Error : (407) Proxy Authentication Required. mili
8/8/2005 9:10:04 PM
Thanks Erick,
This is working for me.

Regards
mili

[quoted text, click to view]
Re: Getting Error : (407) Proxy Authentication Required. Buck
7/13/2006 7:24:43 AM
How can I write NetworkCredential("user", "password",
"domain") without puting my password in the code. Can I pull this from
my computer?



Re: Getting Error : (407) Proxy Authentication Required. Raj Gujar
7/26/2006 8:19:56 AM

I was getting the Same Error , I used this code an it fixed it

Dim wreq As WebRequest
Dim wres As WebResponse
Dim SR As StreamReader
Dim content As String
Dim UserName As String
Dim Password As String
Dim proxy = New System.Net.WebProxy("http://yourproxy-address
with :port")
UserName = "userid"
Password = "password"
proxy.Credentials = New System.Net.NetworkCredential(UserName,
Password, domain)
System.Net.GlobalProxySelection.Select = proxy

wreq = WebRequest.Create(url)
wreq.PreAuthenticate = True
wreq.Proxy = proxy
Dim myWebResponse As WebResponse = wreq.GetResponse()

SR = New StreamReader(myWebResponse.GetResponseStream(), True)
content = SR.ReadToEnd()
SR.Close()


AddThis Social Bookmark Button