场景:
我有一个使用远程WCF服务的Windows服务(作为系统运行)。该机器位于一个ISA代理(没有域,也没有代理用户名/pwd)后面,我已经将代理添加到我的
app.config
<system.net>
<defaultProxy useDefaultCredentials="true">
<proxy
bypassonlocal="False"
proxyaddress="http://myproxyserver:8080"
usesystemdefault="False" />
</defaultProxy>
</system.net>
例外情况:
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)
为什么不同?
我已将该服务更改为以管理员身份运行,并且Windows服务能够完美地访问WCF服务。不幸的是,我需要使用系统帐户,因为服务运行一些遗留的COM+内容,这需要设置“允许服务与桌面交互”选项(此选项仅适用于系统帐户)
另一个奇怪的原因是,系统应该是万能的大爸爸帐户(
more
here
)
我试过的:
this
,
this
,和
this
then
some
.
应用程序配置
为管理员工作,但不为系统工作?
谢谢你的帮助!