This documentation is archived and is not being maintained.

SecurityTokenResolver.ResolveSecurityKey Method

Obtains the key that is referenced in the specified key identifier clause.

Namespace:  System.IdentityModel.Selectors
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

public SecurityKey ResolveSecurityKey(
	SecurityKeyIdentifierClause keyIdentifierClause


Type: System.IdentityModel.Tokens.SecurityKeyIdentifierClause

A SecurityKeyIdentifierClause to retrieve the key for.

Return Value

Type: System.IdentityModel.Tokens.SecurityKey
A SecurityKey that is the key referenced in the specified key identifier clause.


keyIdentifierClause is null.


A key could not be retrieved for the key identifier clause specified in the keyIdentifierClause parameter.

The TryResolveSecurityKey and ResolveSecurityKey methods differ in what happens when the key identifier clause cannot be resolved to a key. The TryResolveSecurityKey method returns false, whereas the ResolveSecurityKey method throws an exception.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0