The token resolver is unable to resolve the security key reference

502 views Asked by At

I am using Windows identification foundation in my project. I am using two certificates for that in my application. one is STS certificate and other is for WCF service project.

I am using SimpleWebTokenHandler for token. But this.Configuration.IssuerTokenResolver.ResolveSecurityKey(clause) throws error: The token resolver is unable to resolve the security key reference

Stack Trace as follows:

[SecurityTokenValidationException: Symmetric key issue. Error isThe token resolver is unable to resolve the security key reference 'NRWA.Business.Token.SimpleWebTokenKeyIdentifierClause'.]
NRWA.Business.Token.SimpleWebTokenHandler.WriteToken(XmlWriter writer, SecurityToken token) in e:\Projects\NRWA\SourceCode\NRWA\WebApplication\NRWA.Business\Token\SimpleWebTokenHandler.cs:410 Microsoft.IdentityModel.Tokens.SecurityTokenSerializerAdapter.WriteTokenCore(XmlWriter writer, SecurityToken token) +407
Microsoft.IdentityModel.Protocols.WSTrust.WSTrustSerializationHelper.WriteRSTRXml(XmlWriter writer, String elementName, Object elementValue, WSTrustSerializationContext context, WSTrustConstantsAdapter trustConstants) +791
Microsoft.IdentityModel.Protocols.WSTrust.WSTrustSerializationHelper.WriteKnownResponseElement(RequestSecurityTokenResponse rstr, XmlWriter writer, WSTrustSerializationContext context, WSTrustResponseSerializer responseSerializer, WSTrustConstantsAdapter trustConstants) +450
Microsoft.IdentityModel.Protocols.WSTrust.WSTrust13ResponseSerializer.WriteKnownResponseElement(RequestSecurityTokenResponse rstr, XmlWriter writer, WSTrustSerializationContext context) +179
Microsoft.IdentityModel.Protocols.WSTrust.WSTrustSerializationHelper.WriteResponse(RequestSecurityTokenResponse response, XmlWriter writer, WSTrustSerializationContext context, WSTrustResponseSerializer responseSerializer, WSTrustConstantsAdapter trustConstants) +344
Microsoft.IdentityModel.Protocols.WSTrust.WSTrust13ResponseSerializer.WriteXml(RequestSecurityTokenResponse response, XmlWriter writer, WSTrustSerializationContext context) +243 Microsoft.IdentityModel.Protocols.WSFederation.WSFederationSerializer.GetResponseAsString(RequestSecurityTokenResponse response, WSTrustSerializationContext context) +227
Microsoft.IdentityModel.Protocols.WSFederation.SignInResponseMessage..ctor(Uri baseUrl, RequestSecurityTokenResponse response, WSFederationSerializer federationSerializer, WSTrustSerializationContext context) +101
Microsoft.IdentityModel.Web.FederatedPassiveSecurityTokenServiceOperations.ProcessSignInRequest(SignInRequestMessage requestMessage, IPrincipal principal, SecurityTokenService sts, WSFederationSerializer federationSerializer) +375
Microsoft.IdentityModel.Web.FederatedPassiveSecurityTokenServiceOperations.ProcessRequest(HttpRequest request, IPrincipal principal, SecurityTokenService sts, HttpResponse response, WSFederationSerializer federationSerializer) +1435
Microsoft.IdentityModel.Web.FederatedPassiveSecurityTokenServiceOperations.ProcessRequest(HttpRequest request, IPrincipal principal, SecurityTokenService sts, HttpResponse response) +18 PassiveSTS._Default.Page_PreRender(Object sender, EventArgs e) in e:\Projects\NRWA\SourceCode\NRWA\WebApplication\NRWA.STS\Default.aspx.cs:30 System.Web.UI.Control.PreRenderRecursiveInternal() +113
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4297

0

There are 0 answers