WebProxy.Address Eigenschaft

Definition

Ruft die Adresse des Proxyservers ab oder legt diese fest.

public:
 property Uri ^ Address { Uri ^ get(); void set(Uri ^ value); };
public Uri? Address { get; set; }
public Uri Address { get; set; }
member this.Address : Uri with get, set
Public Property Address As Uri

Eigenschaftswert

Uri

Eine Uri-Instanz mit der Adresse des Proxyservers.

Beispiele

Im folgenden Codebeispiel werden die Eigenschaften eines WebProxy -Objekts einschließlich dessen Addressangezeigt.

// The following method displays the properties of the 
// specified WebProxy instance.
void DisplayProxyProperties( WebProxy^ proxy )
{
   Console::WriteLine( "Address: {0}", proxy->Address );
   Console::WriteLine( "Bypass on local: {0}", proxy->BypassProxyOnLocal );

   int count = proxy->BypassList->Length;
   if ( count == 0 )
   {
      Console::WriteLine( "The bypass list is empty." );
      return;
   }

   array<String^>^bypass = proxy->BypassList;
   Console::WriteLine( "The bypass list contents:" );
   for ( int i = 0; i < count; i++ )
   {
      Console::WriteLine( bypass[ i ] );

   }
}
// The following method displays the properties of the
// specified WebProxy instance.

public static void DisplayProxyProperties(WebProxy proxy)
{
    Console.WriteLine("Address: {0}", proxy.Address);
    Console.WriteLine( "Bypass on local: {0}", proxy.BypassProxyOnLocal );

    int count = proxy.BypassList.Length;
    if (count == 0)
    {
        Console.WriteLine("The bypass list is empty.");
        return;
    }
    string[] bypass = proxy.BypassList;
    Console.WriteLine("The bypass list contents:");

    for (int i=0; i< count; i++)
    {
        Console.WriteLine(bypass[i]);
    }
}

Hinweise

Die Address -Eigenschaft enthält die Adresse des Proxyservers. Wenn die automatische Proxyerkennung nicht aktiviert ist und kein automatisches Konfigurationsskript angegeben ist, bestimmen die Address -Eigenschaft und BypassList den für eine Anforderung verwendeten Proxy.

Wenn die Address -Eigenschaft lautet null, umgehen Anforderungen den Proxy und stellen eine direkte Verbindung mit dem Zielhost her.

Gilt für: