Reputation: 2059
I frequently encounter this error and my efforts had not any result. Error :
ID8030: The value of the 'type' property could not be parsed.Verify that the type attribute of 'issuerNameRegistry type="Webapp1.TrustedIssuerNameRegistry,webapp1" element is correct.
This is my TrustedIssuerNameRegistry class :
namespace Webapp1
{
public class TrustedIssuerNameRegistery : IssuerNameRegistry
{
private 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);
}
}
}
And this is my web.config configuration :
<system.identityModel>
<identityConfiguration>
<certificateValidation certificateValidationMode="PeerTrust" trustedStoreLocation="LocalMachine" revocationMode="Online"/>
<audienceUris>
<add value="http://localhost:7382/"/>
<add value="http://localhost:50466/"/>
</audienceUris>
<issuerNameRegistry type="Webapp1.WsFederationRequestValidator"></issuerNameRegistry>
</identityConfiguration>
Upvotes: 6
Views: 6848
Reputation: 146
Try changing your web.config identityConfiguration to this:
<issuerNameRegistry type="Webapp1.WsFederationRequestValidator, Webapp1" />
and see if that helps. Also, make sure your reference to System.IdentityModel.Tokens.ValidatingIsserNameRegistry
is correctly setup.
You may have to pull the latest Microsoft Token Validation Extension for Microsoft .Net Framework 4.5
from NuGet.
Upvotes: 13