通過代理調用 WSE Web 服務 (Calling a WSE web-service though a proxy)


問題描述

通過代理調用 WSE Web 服務 (Calling a WSE web‑service though a proxy)

我正在使用 Web Services Enhancements 3.0 從使用 Visual Studio 2005 用 C# 編寫的 ASP.NET 應用程序調用 Web 服務。

如果我可以在 Internet Explorer 中調用 Web 服務更改網絡連接設置以使用特定的 SOCKS5 代理,但從 .ASPX 頁面我收到一條錯誤消息,告訴我應該使用代理。

你知道如何配置網絡服務客戶端使用代理?

謝謝

PS:

將以下內容添加到Web.config不起作用:

<system.net>
  <defaultProxy>
    <proxy proxyaddress="http://theproxy:8080" bypassonlocal="True" />
  </defaultProxy>
</system.net>

參考解法

方法 1:

You need to set "enabled" attribute of defaultProxy element to "true" to make it work:

<system.net>
  <defaultProxy **enabled="true"**>
    <proxy proxyaddress="http://theproxy:8080" bypassonlocal="True" />
  </defaultProxy>
</system.net>

This should work.

(by Julio CésarMik Kardash)

參考文件

  1. Calling a WSE web‑service though a proxy (CC BY‑SA 2.5/3.0/4.0)

#wse #web-services #proxy






相關問題

Windows 2000 下的 WSE 服務器 (WSE Server under Windows 2000)

在 wse 中使用自己的異常,而不僅僅是 SoapException (Using own exceptions in wse, not only SoapException)

從Java調用.NET Web服務(WSE 2/3,WS-Security) (Calling .NET Web Service (WSE 2/3, WS-Security) from Java)

從 WCF 調用 WSE 服務的提示? (Tips for calling WSE service from WCF?)

在 Web 服務 (WSE) 中公開自定義類型(類) (exposing custom types (classes) in a web service (WSE))

在具有自定義類型的 WSE 服務中,構造函數是否在消費客戶端工作? (In WSE services, with custom types, do constructors work on the consuming client's side?)

從 Visual Studio 2005 遷移到 2008 時要注意什麼? (What to look out for when moving from Visual Studio 2005 to 2008?)

通過代理調用 WSE Web 服務 (Calling a WSE web-service though a proxy)

VS 2008 上的 WSE 2.0 SP2 (WSE 2.0 SP2 on VS 2008)

如何在使用 WCF(或 WSE 3)的 Web 服務客戶端應用程序的請求和響應中混合消息編碼類型(文本/MTOM)? (How do I mix message encoding types (Text/MTOM) in the Request & Response of a Web Service client application using WCF (or WSE 3)?)

從 wsdl 創建肥皂 Web 服務客戶端,沒有合同方法 (Create soap web service client from wsdl with no contract methods)

Windows 上的 X.509 證書入門 (Primer for X.509 certificates on Windows)







留言討論