Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ICredentials.GetCredential Method

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

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

NetworkCredential GetCredential(
	Uri uri,
	string authType
)

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, null.

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 null.

The authType parameter is not currently used.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2015 Microsoft