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.
Gibt eine Instanz der Authorization-Klasse für eine Authentifizierungsanforderung an einen Server zurück.
Namespace: System.Net
Assembly: System (in system.dll)
Syntax
'Declaration
Function PreAuthenticate ( _
request As WebRequest, _
credentials As ICredentials _
) As Authorization
'Usage
Dim instance As IAuthenticationModule
Dim request As WebRequest
Dim credentials As ICredentials
Dim returnValue As Authorization
returnValue = instance.PreAuthenticate(request, credentials)
Authorization PreAuthenticate (
WebRequest request,
ICredentials credentials
)
Authorization^ PreAuthenticate (
WebRequest^ request,
ICredentials^ credentials
)
Authorization PreAuthenticate (
WebRequest request,
ICredentials credentials
)
function PreAuthenticate (
request : WebRequest,
credentials : ICredentials
) : Authorization
Parameter
- request
Die der Authentifizierungsanforderung zugeordnete WebRequest-Instanz.
- credentials
Die der Authentifizierungsanforderung zugeordneten Anmeldeinformationen.
Rückgabewert
Eine Authorization-Instanz mit der Autorisierungsmeldung für die Anforderung.
Hinweise
Wenn die CanPreAuthenticate-Eigenschaft true ist, gibt die PreAuthenticate-Methode eine Instanz der Authorization-Klasse mit einer Authentifizierungsmeldung zurück.
Beispiel
Im folgenden Beispiel wird die Verwendung der PreAuthenticate-Methode veranschaulicht. Ein vollständiges Beispiel finden Sie in der AuthenticationManager-Klasse.
' The PreAuthenticate method specifies whether the authentication implemented
' by this class allows pre-authentication.
' Even if you do not use it, this method must be implemented to obey to the rules
' of interface implementation.
' In this case it always returns null.
Public Function PreAuthenticate(ByVal request As WebRequest, ByVal credentials As ICredentials) As Authorization _
Implements IAuthenticationModule.PreAuthenticate
Return Nothing
End Function 'PreAuthenticate
// The PreAuthenticate method specifies whether the authentication implemented
// by this class allows pre-authentication.
// Even if you do not use it, this method must be implemented to obey to the rules
// of interface implementation.
// In this case it always returns null.
public Authorization PreAuthenticate(WebRequest request, ICredentials credentials)
{
return null;
}
// The PreAuthenticate method specifies if the authentication implemented
// by this class allows pre-authentication.
// Even if you do not use it, this method must be implemented to obey to the rules
// of interface implemebtation.
// In this case it always returns null.
virtual Authorization^ PreAuthenticate( WebRequest^ request, ICredentials^ credentials )
{
return nullptr;
}
// The PreAuthenticate method specifies whether the authentication
// implemented by this class allows pre-authentication.
// Even if you do not use it, this method must be implemented to
// obey to the rules of interface implementation.
// In this case it always returns null.
public Authorization PreAuthenticate(WebRequest request,
ICredentials credentials)
{
return null;
} //PreAuthenticate
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
IAuthenticationModule-Schnittstelle
IAuthenticationModule-Member
System.Net-Namespace