WCF服务(本地系统帐户)正在检测用户代理设置
【腾讯云】亏本大甩卖,服务器4核16G 1年370元(带宽12M,系统盘120GB SSD盘,月流量2000GB)!!!!!!
云产品 配置 价格
服务器 1核2G,带宽5M,系统盘50GB SSD盘,月流量500GB 38元/年
MySQL 1核1G 19元/年
服务器 16核32G,带宽18M,系统盘250GB SSD盘,月流量5000GB 1197元/年
点我进入腾讯云,查看更多详情

I'm struggling with an issue that, on the face of it, is well documented but I can't seem to crack.

My application is based around 2 components: a WCF Windows Service and a .net client forms application. The service runs all the time under the Local System account and is primarily used to check for updates, act as a pass-through for web-service calls and manage product information files.

Anyway, when the application is deployed to a user that accesses the web via a proxy the service fails to hit the web-services. This is expected, as the Local System account cannot detect the users proxy settings. I can't figure out how to get around this problem. I can easily solve it on a case by case basis by setting the defualtProxy information in the WCF service config file, but I can't manage the situation on a case-by-case basis - I need my service to detect the proxy settings at runtime. I've read about proxycfg and netsh but I can't see how I can use them in my service.

Any thoughts would be greatly appreciated.

#0

I think this will do what you want, but I haven't been able to verify with many different proxy servers:

<defaultProxy useDefaultCredentials="true">
    <proxy usesystemdefault="True"/>
</defaultProxy>

Here's my related question (not yet answered as of this writing)

推荐文章

被Java安全和BouncyCastle API弄糊涂了

被Java安全和BouncyCastle API弄糊涂了

推荐文章

mongodb实验

mongodb实验

推荐文章

运行时在Ruby方法上获取/设置元数据的最佳策略是什么?

运行时在Ruby方法上获取/设置元数据的最佳策略是什么?

推荐文章

Uploading Files in React While Keeping The UI Completely In Sync

Uploading Files in React While Keeping The UI Completely In Sync

推荐文章

SQL Server 2005性能和空白

SQL Server 2005性能和空白

推荐文章

以编程方式(在c#中)调用页面上的Javascript,然后将其提交回服务器

以编程方式(在c#中)调用页面上的Javascript,然后将其提交回服务器

推荐文章

SQLITE3 使用总结(1)

SQLITE3 使用总结(1)

推荐文章

从Eclipse搜索中排除文件夹

从Eclipse搜索中排除文件夹

推荐文章

EntityCollection而不是Queryable的MethodInfo

EntityCollection而不是Queryable的MethodInfo

推荐文章

From monoliths to the modern web - The great unbundling

From monoliths to the modern web - The great unbundling

推荐文章

Bash文本解析高尔夫

Bash文本解析高尔夫

推荐文章

Going to My First Conference. Pro Tips?

Going to My First Conference. Pro Tips?

推荐文章

分布式锁(Redis实现)

分布式锁(Redis实现)

推荐文章

在iPhone模拟器上运行苹果商店应用程序?

在iPhone模拟器上运行苹果商店应用程序?

推荐文章

SQLITE3 使用总结(2)

SQLITE3 使用总结(2)

推荐文章

How to revert your git commits without panicking

How to revert your git commits without panicking