GetCredential Method
Collapse the table of content
Expand the table of content

ICredentials.GetCredential Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Returns a NetworkCredential object that is associated with the specified URI, and authentication type.

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

'Declaration
Function GetCredential ( _
	uri As Uri, _
	authType As String _
) As NetworkCredential

Parameters

uri
Type: System.Uri
The Uri that the client is providing authentication for.
authType
Type: System.String
A string that specifies the type of authentication.

Return Value

Type: System.Net.NetworkCredential
The NetworkCredential that is associated with the specified URI and authentication type, or, if no credentials are available, Nothing.

The GetCredential method returns a NetworkCredential instance that contains the credentials that are associated with the specified URI and authorization scheme. When no credentials are available, the GetCredential method returns Nothing.

The authType parameter is not currently used.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft