Proxy on Http Bindings
I have a web application connects web service on a machine uses proxy server. Connections are ok on internet explorer as shown in image
And my web.config is: <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" maxArra开发者_开发技巧yLength="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>
I want to use system proxy settings, because it can change time to time. "kurumsalproxy" is a machine name on local network. I tried every potential variations for web.config on http://msdn.microsoft.com/en-us/library/kd3cf2ex.aspx but can not establish to connect.
Is there something that i miss?
I want to use system proxy settings
There is no “system” proxy settings. Every user owns personal proxy configuration. You could create a user with the proxy configuration and change app pool identity to use that account.
UPDATE: How to use the proxy used in Internet Explorer in an ASP.NET application
I don't think you need to change application pool identity, if you carefully read this server fault thread,
https://serverfault.com/questions/34940/how-do-i-configure-proxy-settings-for-local-system
You need to configure the proxy setting for system accounts (local system, local service, and network service) if your application pool identity is Network Service.
精彩评论