使用 Microsoft.IdentityModel.Claims;我的家庭控制器出现故障!
我正在按照Microsoft 指南来实施联合身份。由于它没有说明代码应该放置在哪里,我为其创建了一个文件 \App_Code\Auth.cs
。当需要向我的家庭控制器实现 FederationResult
时,我尝试使用上述命名空间,但 VS 抱怨缺少程序集引用。
奇怪的是,Auth.cs
中的代码没有抱怨...我查看了项目的 References
项,但没有看到任何我想要的东西。可以识别,尽管我对项目做了“添加 STS 引用”。我也查看了 NuGet,但没有看到任何我应该添加的内容...
这里发生了什么?
I'm following the Microsoft guide for implementing federated identities. As it doesn't state where the code should be placed I created a file \App_Code\Auth.cs
for it. when it's time to implement the FederationResult
to my home controller I try to use the aforementioned namespace but VS complains of missing an assembly reference.
The weird thing is that the code in Auth.cs
doesn't complain... I've looked in the References
item of the project and don't see anything I can recognise, although I did "Add STS reference" to the project. I've also looked in NuGet but don't see anything I should add...
what's going on here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯...看来我只需要手动添加引用。我不知道为什么程序集对某些代码片段可用,而对其他代码片段不可用,但它有效!
另一件事,我需要使用
Microsoft.IdentityModel.Web
而不是.Claims
hmm... seems I just needed to add the reference manually. I don't know how come the assembly is available to some pieces of the code and not to others but it works!
One more thing, I needed to use
Microsoft.IdentityModel.Web
not.Claims