在c# 4.0 中,我有一个名为ManufacturerContactDetails 的Web 服务。我使用以下命令从 Windows 应用程序调用该 Web 服务:
var ws = new ManufacturerContactDetailsWebServiceSoapClient();
ContactDetails cd = ws.GetContactDetails("Google");
但是,我想设置 SOAP 客户端使用的 Web 代理服务器。我查找过 ws.Proxy 属性,但它不存在。我不想使用 Internet Explorer 中的那个。
如何设置要使用的 Web 代理服务器?
创建包含以下内容的应用程序配置文件
<system.net>
<defaultProxy useDefaultCredentials="true">
<proxy usesystemdefault="True" bypassonlocal="True"/>
</defaultProxy>
</system.net>
更多信息请点击这里http://blogs.infosupport.com/blogs/porint/archive/2007/08/14/Configuring-a-proxy_2D00_server-for-WCF.aspx http://blogs.infosupport.com/blogs/porint/archive/2007/08/14/Configuring-a-proxy_2D00_server-for-WCF.aspx
Bye
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)