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 / ASP.NET / General / October 2005

Tip: Looking for answers? Try searching our database.

407 Proxy authentication required?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ily - 31 Oct 2005 17:30 GMT
Hi

I have the following code:

       Dim cred1 As New System.Net.NetworkCredential("myusername",
"mypassword", "mydomainname")
       Dim cc As New System.Net.CredentialCache
       cc.Add(New Uri("http://www.yahoo.com"), "Basic", cred1)
       Dim wp As System.Net.WebProxy = New
System.Net.WebProxy("myproxy", 80)
       wp.Credentials = cc

       Dim wr As WebRequest = WebRequest.CreateDefault(New
Uri("http://www.yahoo.com"))
       wr.Proxy = wp
       Dim wrep As WebResponse = wr.GetResponse()

       Dim st As MemoryStream = wrep.GetResponseStream()
       Dim sr As StreamReader = New StreamReader(st)
       Dim result As String = sr.ReadToEnd()
       Response.Write(result)
       Response.End()
   End Sub

When I execute the above code I get the error "The remote server
returned an error: (407) Proxy Authentication Required"
Juan T. Llibre - 31 Oct 2005 17:44 GMT
See : http://support.microsoft.com/default.aspx?scid=kb;en-us;248020

Also, verify your syntax against this example :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fSystemNetWebRequestClassProxyTopic.asp


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
> Hi
>
[quoted text clipped - 22 lines]
> When I execute the above code I get the error "The remote server
> returned an error: (407) Proxy Authentication Required"

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.