Http 绑定上的代理

发布于 2024-12-09 12:57:44 字数 1778 浏览 1 评论 0原文

我有一个网络应用程序使用代理服务器连接计算机上的网络服务。 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 上尝试了 web.config 的所有潜在变体。 com/en-us/library/kd3cf2ex.aspx 但无法建立连接。

有什么我想念的吗?

I have a web application connects web service on a machine uses proxy server. Connections are ok on internet explorer as shown in image

Proxy settings
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" 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>

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

×眷恋的温暖 2024-12-16 12:57:44

我想使用系统代理设置

没有“系统”代理设置。每个用户都拥有个人代理配置。您可以使用代理配置创建一个用户,并更改应用程序池身份以使用该帐户。

更新:如何在 ASP.NET 应用程序中使用 Internet Explorer 中使用的代理

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

爱情眠于流年 2024-12-16 12:57:44

如果您仔细阅读此服务器故障线程,我认为您不需要更改应用程序池标识,

https://serverfault.com/questions/34940/how-do-i-configure-proxy-settings-for-local-system

您需要为系统配置代理设置帐户(本地系统、本地服务和网络服务)(如果您的应用程序池标识是网络服务)。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文