Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

ICredentialsByHost.GetCredential Method

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

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

'Declaration
Function GetCredential ( _
	host As String, _
	port As Integer, _
	authenticationType As String _
) As NetworkCredential
'Usage
Dim instance As ICredentialsByHost
Dim host As String
Dim port As Integer
Dim authenticationType As String
Dim returnValue As NetworkCredential

returnValue = instance.GetCredential(host, port, 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
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.