I can fix the problem with the client where they cannot authenticate through the proxy server by doing the following:
var proxy = WebRequest.GetSystemWebProxy(); proxy.Credentials = CredentialCache.DefaultNetworkCredentials; service.Proxy = proxy;
This works fine for Windows XP, however on Windows 7 I get 407 (an unauthenticated exception). Does anyone know what the difference is, and more importantly, what do I need to do to get this to work on both OSs?
UPDATE
I have users who check the following:
- In the registry editor, you can go to HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Winlogon and tell me that this value is for CachedLogonsCount. e
- In the "Start" field, enter the group policy, and you will be able to change the group policy, click on it. Then go to Computer Configuration \ Administrative Templates \ System \ User Profiles \ Delete cached copies of roaming profiles and tell me if it is configured, and if so, what is it installed?
UPDATE FOR BOUNTY
So, I added generosity. I can make a decision from here or just an alternative means to go through a proxy server in Windows 7 ...
Another update
I'm not sure if this is useful or not, but we also do the following:
service.PreAuthenticate = true; service.Url = "myurl"; service.Credentials = new NetworkCredential(txt_UserName.Text, txt_Password.Text);
My workaround
This is actually not a solution, but it works for now. I use app.config and set the default proxy using ByPassList so that the proxy is not even used. This can only be done when the proxy server does not currently have a strong firewall. For other clients, I need to make the above work.
source share