Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Ruft die Proxyinformationen zum Erstellen einer XML-Webdienstanforderung über einen Firewall ab oder legt sie fest.
Namespace: System.Web.Services.Protocols
Assembly: System.Web.Services (in system.web.services.dll)
Syntax
'Declaration
Public Property Proxy As IWebProxy
'Usage
Dim instance As HttpWebClientProtocol
Dim value As IWebProxy
value = instance.Proxy
instance.Proxy = value
public IWebProxy Proxy { get; set; }
public:
property IWebProxy^ Proxy {
IWebProxy^ get ();
void set (IWebProxy^ value);
}
/** @property */
public IWebProxy get_Proxy ()
/** @property */
public void set_Proxy (IWebProxy value)
public function get Proxy () : IWebProxy
public function set Proxy (value : IWebProxy)
Eigenschaftenwert
Ein IWebProxy mit den Proxyinformationen zum Ausführen einer Anforderung über eine Firewall. Die Proxyeinstellungen des Betriebssystems werden als Standardwert verwendet.
Hinweise
Verwenden Sie die Proxy-Eigenschaft, wenn für einen Client Proxyeinstellungen erforderlich sind, die von den Systemeinstellungen abweichen. Mit der WebProxy-Klasse können Sie die Proxyeinstellungen festlegen, da IWebProxy implementiert wird.
Die Standardproxyeinstellungen können in einer Konfigurationsdatei festgelegt werden. Ausführliche Informationen finden Sie unter Konfigurieren von Internetanwendungen.
Beispiel
Im folgenden Beispiel werden vor dem Aufrufen des Math-XML-Webdiensts die folgenden Proxyeinstellungen festgelegt: Die Adresse des Proxyservers lautet http://proxyserver, der Proxyanschluss ist 80, und der Proxyserver wird bei lokalen Adressen umgangen.
Dim math As New MyMath.Math()
' Set the proxy server to proxyserver, set the port to 80, and specify
' to bypass the proxy server for local addresses.
Dim proxyObject As New WebProxy("http://proxyserver:80", True)
math.Proxy = proxyObject
' Call the Add XML Web service method.
Dim total As Integer = math.Add(8, 5)
MyMath.Math math = new MyMath.Math();
// Set the proxy server to proxyserver, set the port to 80, and specify to bypass the proxy server
// for local addresses.
IWebProxy proxyObject = new WebProxy("http://proxyserver:80", true);
math.Proxy = proxyObject;
// Call the Add XML Web service method.
int total = math.Add(8, 5);
MyMath::Math^ math = gcnew MyMath::Math;
// Set the proxy server to proxyserver, set the port to 80, and specify to bypass the proxy server
// for local addresses.
IWebProxy^ proxyObject = gcnew WebProxy( "http://proxyserver:80",true );
math->Proxy = proxyObject;
// Call the Add XML Web service method.
int total = math->Add( 8, 5 );
MyMath.Math math = new MyMath.Math();
// Set the proxy server to proxyserver, set the port to 80,
// and specify to bypass the proxy server
// for local addresses.
IWebProxy proxyObject = new WebProxy("http://proxyserver:80", true);
math.set_Proxy(proxyObject);
// Call the Add XML Web service method.
int total = math.Add(8, 5);
Plattformen
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
.NET Compact Framework
Unterstützt in: 2.0, 1.0
Siehe auch
Referenz
HttpWebClientProtocol-Klasse
HttpWebClientProtocol-Member
System.Web.Services.Protocols-Namespace
IWebProxy
WebProxy