Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Remoting / July 2006

Tip: Looking for answers? Try searching our database.

Getting Error : (407) Proxy Authentication Required.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mili - 05 Aug 2005 06:25 GMT
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
Erick Sgarbi - 05 Aug 2005 12:32 GMT
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

> Hi,
> I am using events in .Net remoting Scenario, So server process can invoke
[quoted text clipped - 9 lines]
>
> Thanks
mili - 09 Aug 2005 05:10 GMT
Thanks Erick,
This is working for me.

Regards
mili

> Can you post some code... from here I can only suggest this:
>
[quoted text clipped - 20 lines]
> >
> > Thanks
Buck - 13 Jul 2006 15:24 GMT
How can I write NetworkCredential("user", "password",
"domain") without puting my password in the code.  Can I pull this from
my computer?
Raj Gujar - 26 Jul 2006 16:19 GMT
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()

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.