G
Guest
Hi,
I have a windows application that is using the System.Net.WebClient class to
download files requested by the user from a remote server. I am having
problems getting proxy authentication to work correctly.
Essentially I need the application to prompt the user for a username and
password if required for the proxy. I would like to use the windows network
authentication to perform this ( i.e the prompt that you would get in IE when
proxy authentication is required). Is there a way to get the WebClient to
prompt for authentication automatically if required ( I am always using the
default IE proxy).
Simply put:
WebClient client = new WebClient()
client.Proxy.Credentials = CredentialCache.DefaultCredentials;
// the following line will fail when an authenticating proxy
byte[] data = client.DownloadData( "....");
Regards,
Daniel
I have a windows application that is using the System.Net.WebClient class to
download files requested by the user from a remote server. I am having
problems getting proxy authentication to work correctly.
Essentially I need the application to prompt the user for a username and
password if required for the proxy. I would like to use the windows network
authentication to perform this ( i.e the prompt that you would get in IE when
proxy authentication is required). Is there a way to get the WebClient to
prompt for authentication automatically if required ( I am always using the
default IE proxy).
Simply put:
WebClient client = new WebClient()
client.Proxy.Credentials = CredentialCache.DefaultCredentials;
// the following line will fail when an authenticating proxy
byte[] data = client.DownloadData( "....");
Regards,
Daniel