Re: The remote server returned an error: (407) Proxy Authentication Re

Tech-Archive recommends: Fix windows errors by optimizing your registry



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

.



Relevant Pages

  • Re: access only to one external site
    ... Is the firewall client installed on the client? ... Is the browser configured to use a proxy or not? ... If you can send a zipped print screen of the Destination Set definition it ...
    (microsoft.public.isa.configuration)
  • Re: Using Google to read RMMGA
    ... > laptop where I just occasionally switches over to Windows ... > what gets through to your browser is the 'privoxy' junk filtering proxy ... > (http://www.privoxy.org is the web site I believe). ...
    (rec.music.makers.guitar.acoustic)
  • Re: Network connection
    ... >>> Is it time to read about proxies? ... >> servers on Wikipedia and reverted some vandalism there. ... >>>of proxy or port not allowed on the firewall. ... > sites that you weren't able to access with a browser? ...
    (uk.comp.os.linux)
  • How to starthandshake with client browser??
    ... The task i need to do is reveice a CONNECT response from a browser, ... And then my program need to communicate with the destinated server. ... My program can named as Proxy Server,however, it is a simply proxy ...
    (comp.lang.java.programmer)
  • How to starthandshake with client browser??
    ... The task i need to do is reveice a CONNECT response from a browser, ... And then my program need to communicate with the destinated server. ... My program can named as Proxy Server,however, it is a simply proxy ...
    (comp.lang.java.help)