【发布时间】:2011-10-14 06:28:48
【问题描述】:
我有一个 Web 应用程序在使用代理服务器的机器上连接 Web 服务。如图所示,Internet Explorer 上的连接正常
我的 web.config 是:
<system.net>
<defaultProxy>
<proxy autoDetect="true" usesystemdefault="true"/>
</defaultProxy>
</system.net>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="ProcessSoap" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
useDefaultWebProxy="true" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
>
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://www.serveraddressthatiwanttoconnect.com/services/WebService.asmx"
binding="basicHttpBinding" bindingConfiguration="ProcessSoap"
contract="PINAlmaServis.ProcessSoap" name="ProcessSoap" />
</client>
我想使用系统代理设置,因为它可以不时更改。 “kurumsalproxy”是本地网络上的机器名称。我在http://msdn.microsoft.com/en-us/library/kd3cf2ex.aspx 上尝试了 web.config 的所有潜在变化,但无法建立连接。
有什么我想念的吗?
【问题讨论】:
标签: c# asp.net networking proxy web-config