Export (0) Print
Expand All

ICredentialsByHost.GetCredential Method

Returns the credential for the specified host, port, and authentication protocol.

Namespace: System.Net
Assembly: System (in system.dll)

NetworkCredential GetCredential (
	string host,
	int port,
	string authenticationType
)
NetworkCredential GetCredential (
	String host, 
	int port, 
	String authenticationType
)
function GetCredential (
	host : String, 
	port : int, 
	authenticationType : String
) : NetworkCredential
Not applicable.

Parameters

host

The host computer that is authenticating the client.

port

The port on host that the client will communicate with.

authenticationType

The authentication protocol.

Return Value

A NetworkCredential for the specified host, port, and authentication protocol, or a null reference (Nothing in Visual Basic) if there are no credentials available for the specified host, port, and authentication protocol.

The value of authType corresponds to the IAuthenticationModule.AuthenticationType property.

Windows 98, Windows Server 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

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft