Certificate 为什么我会出现这个错误:“quot;证券代币的发行人未被发行人注册机构识别;

Certificate 为什么我会出现这个错误:“quot;证券代币的发行人未被发行人注册机构识别;,certificate,single-sign-on,wif,sts-securitytokenservice,ws-federation,Certificate,Single Sign On,Wif,Sts Securitytokenservice,Ws Federation,当我想使用自定义STS运行我的应用程序时(我已经编写了它,并且它工作得很好),首先我会遇到以下错误: ***ID8030: The value of the 'type' property could not be parsed.Verify that the type attribute of '<issuerNameRegistry type="Webapp1.TrustedIssuerNameRegistry,webapp1">*** 安全令牌的颁发者未被颁发者注册机构识别

当我想使用自定义STS运行我的应用程序时(我已经编写了它,并且它工作得很好),首先我会遇到以下错误:

***ID8030: The value of the 'type' property could not be parsed.Verify that the type attribute of '<issuerNameRegistry type="Webapp1.TrustedIssuerNameRegistry,webapp1">***
安全令牌的颁发者未被颁发者注册机构识别

我测试了此错误的所有解决方案,但仍然存在此错误

我添加了“TrusteDissuerNameRegistry”类,并将其设置在web.config中

public class TrustedIssuerNameRegistery : IssuerNameRegistry
{
    string issuerName = string.Empty;
    public override string GetIssuerName(SecurityToken securityToken)
    {
        if (securityToken != null)
        {
            X509SecurityToken x509Cert = securityToken as X509SecurityToken;
            if (x509Cert != null && x509Cert.Certificate.SubjectName.Name == "CN=busta-ip1sts.com")
            {
                issuerName = x509Cert.Certificate.SubjectName.Name;
            }
        }
        if (string.IsNullOrEmpty(issuerName))
        {
            throw new SecurityTokenException("Untrusted issuer.");
        }

        return issuerName;
    }

    public override string GetIssuerName(System.IdentityModel.Tokens.SecurityToken securityToken, string requestedIssuerName)
    {
        return base.GetIssuerName(securityToken, requestedIssuerName);
    }
}
这是web.config设置:

<issuerNameRegistry type='Webapp1.TrustedIssuerNameRegistry' />

然后我得到这个错误:

***ID8030: The value of the 'type' property could not be parsed.Verify that the type attribute of '<issuerNameRegistry type="Webapp1.TrustedIssuerNameRegistry,webapp1">***
***ID8030:无法分析'type'属性的值。请验证'***
我甚至安装了“ValidatingIssuerNameRegistry”dll并在web.config中注册了它,但我再次遇到了第一个错误

为什么我经常出现这个错误?怎么了?我还能做什么?
如果你愿意,我也可以给你我的源代码

看起来您还需要程序集名称:“WebApp1.trustedissuernamerRegistry,AssemblyName”


另一方面,我希望issuer name注册表仅用于测试,它是不安全的,因为任何人都可以使用该主题名创建证书。

是的,它只是用于测试