Stubborn web proxy

  • Thread starter Thread starter toa
  • Start date Start date
T

toa

Hi!

I'm trying to send a http request from a Windows form to a third-party
server. At the outset, I got an exception - error "407 proxy authentication
required", which I suppose is a message from my company's proxy server,
requiring me to authenticate myself before it will let me out on the
Internet at large.

I then did this:

System.Net.HttpWebRequest HR = null;
System.Net.NetworkCredential NCR;
NCR = new System.Net.NetworkCredential("MyLogon", "MyPassword", "MyDomain");
HR = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(strURL);
HR.Credentials = HR.Proxy.Credentials = NCR;

I.e., I added a NetworkCredential to the request, giving my own username,
password and domain. It then works fine. Except I don't want to have to give
this information in my app - after all, my users will be logged on to
Windows already as they start the app, they shouln't be required to give
their credentials again when starting this app. So how do I go about
presenting the current Windows-login credentials to the proxy?

TIA
Torgeir Apeland
 
I don't know your desktop or net setup, but can you not retrieve their
browser proxy settings and use those, if your on an NT or Win2000 network
using MS Proxy or ISA server you should have integrated authentication
setup - I don't know what system calls to make though as I have never had to
use these services.

Not very helpful I know, but an idea.

Merlin.
 
Back
Top