Re: The remote server returned an error: (407) Proxy Authentication Re
- From: "Nicholas Paldino [.NET/C# MVP]" <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 28 Nov 2007 23:41:10 -0500
Richard,
You might want to change the code that calls the static Create method to call off the WebRequest class. It won't fix your problem, but it makes the code a little more accurate (considering that you are getting an HttpWebRequest based on the URL).
The reason it works for you in your browser is because your browser is set up correctly to use a proxy. You have to do the same thing in code, creating an instance of the WebProxy class, setting the properties on it, and then setting the Proxy property to that WebProxy instance.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx
<Richard@xxxxxxxxxxxxx> wrote in message news:F8E09733-85ED-48DB-8EF6-B521DFA49035@xxxxxxxxxxxxxxxx
My webcam app runs OK on XP but not on Vista. Here's my code snippet that
has been working up until now:
System.Net.WebRequest request;
System.Net.WebResponse response;
request = System.Net.FileWebRequest.Create(
"http://store.bearvalley.com/live/camimage_00001.jpg");
response = request.GetResponse();
When it tries to execute the request.GetResponse() call I get the following
exception:
The remote server returned an error: (407) Proxy Authentication Required.
I can paste the uri into my browser and it works OK.
Any assistance would be greatly appreciated.
Thanks! ;^)
Richard
.
- Follow-Ups:
- Re: The remote server returned an error: (407) Proxy Authenticatio
- From: Richard@nospam.nospam
- Re: The remote server returned an error: (407) Proxy Authenticatio
- Prev by Date: Re: Needing info on passing data between applications. Win[C#]
- Next by Date: Draw ellipse with specify x,y,width, height
- Previous by thread: Needing info on passing data between applications. Win[C#]
- Next by thread: Re: The remote server returned an error: (407) Proxy Authenticatio
- Index(es):
Relevant Pages
|