WIF-FederatedPassiveSecurityTokenServiceOperations.ProcessSignInRequest调用产生“指定了无效的提供者类型"错误 [英] WIF - FederatedPassiveSecurityTokenServiceOperations.ProcessSignInRequest call produces “Invalid provider type specified” Error

查看:58
本文介绍了WIF-FederatedPassiveSecurityTokenServiceOperations.ProcessSignInRequest调用产生“指定了无效的提供者类型"错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么在调用此WIF方法FederatedPassiveSecurityTokenServiceOperations.ProcessSignInRequest时出现此错误,指定了无效的提供程序类型"?  

我的STS应用程序在4.6.2下运行.框架,我参考了最新的WIF DLL:System.IdenityModel等.


在System.Security.Cryptography.Utils.CreateProvHandle(CspParameters参数,布尔randomKeyContainer)处
    at System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType keyType,CspParameters参数,布尔型randomKeyContainer,Int32 dwKeySize,SafeProvHandle& safeProvHandle,SafeKeyHandle& safeKeyHandle)
    at System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair()
    at System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize,CspParameters参数,布尔值useDefaultKeySize)
    at System.Security.Cryptography.X509Certificates.X509Certificate2.get_PrivateKey()
    at System.IdentityModel.Tokens.X509AsymmetricSecurityKey.get_PrivateKey()
    at System.IdentityModel.Tokens.X509AsymmetricSecurityKey.GetAsymmetricAlgorithm(String algorithm,Boolean privateKey)
    at Microsoft.IdentityModel.CryptoUtil.GetSignatureFormatterForSha256(AsymmetricSecurityKey密钥)
    at Microsoft.IdentityModel.Protocols.XmlSignature.SignedXml.ComputeSignature(SecurityKey signingKey)
    at Microsoft.IdentityModel.Protocols.XmlSignature.EnvelopedSignatureWriter.ComputeSignature()
    at Microsoft.IdentityModel.Protocols.XmlSignature.EnvelopedSignatureWriter.OnEndRootElement()
    at Microsoft.IdentityModel.Tokens.Saml11.Saml11SecurityTokenHandler.WriteAssertion(XmlWriter编写器,SamlAssertion断言)
    at Microsoft.IdentityModel.Tokens.SecurityTokenSerializerAdapter.WriteTokenCore(XmlWriter writer,SecurityToken token)
  Microsoft.IdentityModel.Protocols.WSTrust.WSTrustSerializationHelper.WriteRSTRXml(XmlWriter writer,String elementName,Object elementValue,WSTrustSerializationContext上下文,WSTrustConstantsAdapter trustConstants)
  Microsoft.IdentityModel.Protocols.WSTrust.WSTrustSerializationHelper.WriteKnownResponseElement(RequestSecurityTokenResponse rstr,XmlWriter writer,WSTrustSerializationContext上下文,WSTrustResponseSerializer responseSerializer,WSTrustConstantsAdapter trustConstants)
  Microsoft.IdentityModel.Protocols.WSTrust.WSTrust13ResponseSerializer.WriteKnownResponseElement(RequestSecurityTokenResponse rstr,XmlWriter编写者,WSTrustSerializationContext上下文)
  Microsoft.IdentityModel.Protocols.WSTrust.WSTrustSerializationHelper.WriteResponse(RequestSecurityTokenResponse响应,XmlWriter编写器,WSTrustSerializationContext上下文,WSTrustResponseSerializer响应Serializer,WSTrustConstantsAdapter trustConstants)
  Microsoft.IdentityModel.Protocols.WSTrust.WSTrust13ResponseSerializer.WriteXml(RequestSecurityTokenResponse响应,XmlWriter编写器,WSTrustSerializationContext上下文)
    at Microsoft.IdentityModel.Protocols.WSFederation.WSFederationSerializer.GetResponseAsString(RequestSecurityTokenResponse响应,WSTrustSerializationContext上下文)
    at Microsoft.IdentityModel.Protocols.WSFederation.SignInResponseMessage..ctor(Uri baseUrl,RequestSecurityTokenResponse响应,WSFederationSerializer federationSerializer,WSTrustSerializationContext上下文)
  Microsoft.IdentityModel.Web.FederatedPassiveSecurityTokenServiceOperations.ProcessSignInRequest(SignInRequestMessage requestMessage,IPrincipal主体,SecurityTokenService sts,WSFederationSerializer federationSerializer)
   位于C:\ CurrentDevelopment \ YYY \ STS \ XXX \ XXX.Membership.SecurityTokenService \ Default.aspx.cs:第108行中的XXX.Membership.SecurityTokenService.Default.Page_PreRender(对象发送方,EventArgs e)

Why am I getting this error,  "Invalid provider type specified", when I call this WIF method, FederatedPassiveSecurityTokenServiceOperations.ProcessSignInRequest?  

My STS app is running under the 4.6.2. framework, and I am reference the latest WIF DLL's: System.IdenityModel, etc.


at System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer)
   at System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 dwKeySize, SafeProvHandle& safeProvHandle, SafeKeyHandle& safeKeyHandle)
   at System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair()
   at System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize, CspParameters parameters, Boolean useDefaultKeySize)
   at System.Security.Cryptography.X509Certificates.X509Certificate2.get_PrivateKey()
   at System.IdentityModel.Tokens.X509AsymmetricSecurityKey.get_PrivateKey()
   at System.IdentityModel.Tokens.X509AsymmetricSecurityKey.GetAsymmetricAlgorithm(String algorithm, Boolean privateKey)
   at Microsoft.IdentityModel.CryptoUtil.GetSignatureFormatterForSha256(AsymmetricSecurityKey key)
   at Microsoft.IdentityModel.Protocols.XmlSignature.SignedXml.ComputeSignature(SecurityKey signingKey)
   at Microsoft.IdentityModel.Protocols.XmlSignature.EnvelopedSignatureWriter.ComputeSignature()
   at Microsoft.IdentityModel.Protocols.XmlSignature.EnvelopedSignatureWriter.OnEndRootElement()
   at Microsoft.IdentityModel.Tokens.Saml11.Saml11SecurityTokenHandler.WriteAssertion(XmlWriter writer, SamlAssertion assertion)
   at Microsoft.IdentityModel.Tokens.SecurityTokenSerializerAdapter.WriteTokenCore(XmlWriter writer, SecurityToken token)
   at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustSerializationHelper.WriteRSTRXml(XmlWriter writer, String elementName, Object elementValue, WSTrustSerializationContext context, WSTrustConstantsAdapter trustConstants)
   at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustSerializationHelper.WriteKnownResponseElement(RequestSecurityTokenResponse rstr, XmlWriter writer, WSTrustSerializationContext context, WSTrustResponseSerializer responseSerializer, WSTrustConstantsAdapter trustConstants)
   at Microsoft.IdentityModel.Protocols.WSTrust.WSTrust13ResponseSerializer.WriteKnownResponseElement(RequestSecurityTokenResponse rstr, XmlWriter writer, WSTrustSerializationContext context)
   at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustSerializationHelper.WriteResponse(RequestSecurityTokenResponse response, XmlWriter writer, WSTrustSerializationContext context, WSTrustResponseSerializer responseSerializer, WSTrustConstantsAdapter trustConstants)
   at Microsoft.IdentityModel.Protocols.WSTrust.WSTrust13ResponseSerializer.WriteXml(RequestSecurityTokenResponse response, XmlWriter writer, WSTrustSerializationContext context)
   at Microsoft.IdentityModel.Protocols.WSFederation.WSFederationSerializer.GetResponseAsString(RequestSecurityTokenResponse response, WSTrustSerializationContext context)
   at Microsoft.IdentityModel.Protocols.WSFederation.SignInResponseMessage..ctor(Uri baseUrl, RequestSecurityTokenResponse response, WSFederationSerializer federationSerializer, WSTrustSerializationContext context)
   at Microsoft.IdentityModel.Web.FederatedPassiveSecurityTokenServiceOperations.ProcessSignInRequest(SignInRequestMessage requestMessage, IPrincipal principal, SecurityTokenService sts, WSFederationSerializer federationSerializer)
   at XXX.Membership.SecurityTokenService.Default.Page_PreRender(Object sender, EventArgs e) in C:\CurrentDevelopment\YYY\STS\XXX\XXX.Membership.SecurityTokenService\Default.aspx.cs:line 108

推荐答案

 您好

 Hi Elvis13,

检查 MSDN的FederatedPassiveSecurityTokenServiceOperations 类.

When check FederatedPassiveSecurityTokenServiceOperations Class from MSDN.


这篇关于WIF-FederatedPassiveSecurityTokenServiceOperations.ProcessSignInRequest调用产生“指定了无效的提供者类型"错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆