"Not this again" I hear you say. Yeah, I know. But this one is different... I think.
The scenario:
I have a Windows service (running as SYSTEM) that consumes a remote WCF service. The machine sits behind an ISA proxy (no domain, and no proxy username/pwd) and I have added the proxy to my app.config
. Here it is:
<system.net>
<defaultProxy useDefaultCredentials="true">
<proxy
bypassonlocal="False"
proxyaddress="http://myproxyserver:8080"
usesystemdefault="False" />
</defaultProxy>
</system.net>
The exception:
System.Net.WebException:
The remote server returned an error: (407) Proxy Authentication Required.
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel. ...
HttpChannelRequest.WaitForReply(TimeSpan timeout)
Why this is different? I have changed the service to run as an Administrator, and the Windows service was able to access the WCF service perfectly. Unfortunately I need to use the SYSTEM account, as the service runs some legacy COM+ stuff, which requires the "Allow service to interact with desktop" option to be set. (This option is only available for the SYSTEM account)
Another reason why this is strange is that SYSTEM is supposed to be the big daddy almighty account (more here)
What I've tried: I've tried this, this, and this... and then some.
This one is a bit of a mystery. Why would my app.config
work for administrator, but not for SYSTEM?
Thanks for the help!