发现securityToken没有有效的键映射 [英] No valid key mapping found for securityToken
问题描述
我正在开发用于显示MVC-ASP.net认证的身份索赔测试应用(视觉工作室2013年)
我在下面给出从Active Directory认证。
I am developing test application for displaying claims of authenticated identity in MVC-ASP.net (Visual studio 2013) I have given authentication from active directory in following way.
在解决方案1.增加新的MVC项目。
2.单击更改身份验证。
3.选择组织帐户
4.选择在premises。
5.given联邦网址
6.App标识网址
1.Add new mvc project in solution . 2.click on Change authentication. 3.select organization account 4.select on premises. 5.given federation url 6.App Id url
在运行应用程序后,我收到以下错误。
After running the application i am getting following error.
WIF10201:发现securityToken没有有效的键映射:System.IdentityModel.Tokens.X509SecurityToken和发行人:<一个href=\"http://websso.avanade.com/adfs/services/trust\">http://websso.avanade.com/adfs/services/trust'
WIF10201: No valid key mapping found for securityToken: 'System.IdentityModel.Tokens.X509SecurityToken' and issuer: 'http://websso.avanade.com/adfs/services/trust'
此错误是只来了这个联盟其他联邦,我能够看到的要求。
This error is coming only for this federation for other federation i am able to see claims.
搜索互联网上我在想,这是证书(指纹)问题之后。
但我不明确的解决方案。
After searching on internet i am thinking that it is certificate(thumbprint) issue. But I am not clear with solutions.
有人能解释我为什么这个错误引发和解决方法是相同的。
Can anybody explain me why this error throwing and solution for the same.
先谢谢了!
推荐答案
有可能是2案件此错误。
There are might be 2 cases for this error.
-
获取来自ADFS的实际指纹,并把在web.config中指纹标记
Get the actual thumbprint from ADFS and put in web.config thumbprint tag
在端口号不匹配(运行的应用程序的端口号,这是在ADFS配置的端口号)
mismatch in port number (running application port number and port number which is configured in ADFS)
我做了第二个选项,它为我的作品...
I did second option and it works for me...
这篇关于发现securityToken没有有效的键映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!