Mono Class Library: System.Net.CredentialCache Overview | MembersSystem.Net.CredentialCache.GetCredential Method |
Returns the System.Net.NetworkCredential instance associated with a URI and authentication type. [Edit]
|
- uriPrefix
- A Uri that contains the URI prefix of resources for which the client will be authenticated. [Edit]
- authType
- A string containing the authentication type used by the resource named in uriPrefix . This string is required to be identical to the IAuthenticationModule.AuthenticationType of the authentication module that uses the credential. [Edit]
A System.Net.NetworkCredential, or null if there is no matching credential in the cache. [Edit]
Type Reason ArgumentNullException The uriPrefix or authType parameter is null. [Edit]
This method searches the System.Net.CredentialCache and returns the System.Net.NetworkCredential instance for the specified URI prefix and authentication type. This method uses the longest matching URI prefix in the cache to determine which credentials to return for an authentication type.
Note:[Edit]The following table shows the matches for a set of URI prefixes (assuming the URI prefixes are all cached for the specified authentication type).
URI Prefix Matches http://www.contoso.com/portal/news.htm Matches only requests for http://www.contoso.com/portal/news.htm. http://www.contoso.com/portal/ Matches requests for all resources in the portal path, except for requests for the http://www.contoso.com/portal/news.htm page. http://www.contoso.com/ Matches requests for all resources at www.contoso.com, except those in the portal path.
Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0