Freigeben über


HttpGetClientProtocol-Konstruktor

Initialisiert eine neue Instanz der HttpGetClientProtocol-Klasse.

Namespace: System.Web.Services.Protocols
Assembly: System.Web.Services (in system.web.services.dll)

Syntax

'Declaration
Public Sub New
'Usage
Dim instance As New HttpGetClientProtocol
public HttpGetClientProtocol ()
public:
HttpGetClientProtocol ()
public HttpGetClientProtocol ()
public function HttpGetClientProtocol ()

Beispiel

' Math is a proxy class derived from HttpGetClientProtocol.
Dim myHttpGetClientProtocol As New Math()

' Obtain password from a secure store.
Dim SecurelyStoredPassword As String = String.Empty

' Set the client-side credentials using the Credentials property.
Dim credentials = _
    New NetworkCredential("Joe", "mydomain", SecurelyStoredPassword)
myHttpGetClientProtocol.Credentials = credentials

' Allow the server to redirect the request.
myHttpGetClientProtocol.AllowAutoRedirect = True
Console.WriteLine("Auto redirect is: " _
    & myHttpGetClientProtocol.AllowAutoRedirect)
        // Math is a proxy class derived from HttpGetClientProtocol.
        HttpGetClientProtocol myHttpGetClientProtocol = new Math();

        // Obtain password from a secure store.
        String SecurelyStoredPassword = String.Empty;

        // Set the client-side credentials using the Credentials property.
        ICredentials credentials = 
            new NetworkCredential("Joe", "mydomain", SecurelyStoredPassword);
        myHttpGetClientProtocol.Credentials = credentials;
        Console.WriteLine("Auto redirect is: "
            + myHttpGetClientProtocol.AllowAutoRedirect);
    }
}
   // Math is a proxy class derived from HttpGetClientProtocol.
   HttpGetClientProtocol^ myHttpGetClientProtocol = gcnew ::Math;
   
   // Obtain password from a secure store.
   String^ SecurelyStoredPassword = String::Empty;
   
   // Set the client-side credentials using the Credentials property.
   ICredentials^ credentials = gcnew NetworkCredential( "Joe","mydomain",SecurelyStoredPassword );
   myHttpGetClientProtocol->Credentials = credentials;
   Console::WriteLine( "Auto redirect is: {0}", myHttpGetClientProtocol->AllowAutoRedirect );
}
        // Math is a proxy class derived from HttpGetClientProtocol.
        HttpGetClientProtocol myHttpGetClientProtocol = new Math();
      
        // Obtain password from a secure store.
        String securelyStoredPassword = String.Empty;
      
        // Set the client-side credentials using the Credentials property.
        ICredentials credentials = new NetworkCredential("Joe", "mydomain",
            securelyStoredPassword);
        myHttpGetClientProtocol.set_Credentials(credentials);
        Console.WriteLine("Auto redirect is: " 
            + myHttpGetClientProtocol.get_AllowAutoRedirect());
        
    } //main
} //HttpGetClientProtocolClass

Plattformen

Windows 98, Windows 2000 SP4, Windows Millennium Edition, 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

Siehe auch

Referenz

HttpGetClientProtocol-Klasse
HttpGetClientProtocol-Member
System.Web.Services.Protocols-Namespace