Microsoft.IdentityModel vs System.IdentityModel

谁说胖子不能爱 提交于 2019-12-04 15:49:42

问题


I'm working on a claims-based authorization system using Forms Authentication and ASP.NET MVC 2. I see that one namespace "Microsoft.IdentityModel" provides a lot of the same things as the other "System.IdentityModel".

System.IdentityModel

Microsoft.IdentityModel

Why do these 2 namespaces exist seperately, when the functionality appears to overlap?


回答1:


If you are using Claims Based authentication/authorization, then you will need to use Microsoft.IdentityModel as that is part of the Windows Identity Framework.

For guidance around MVC2 and using WIF I would recommend checking out the work that Patterns and Practices did. They have a decent MVC sample that I used as a starting point.




回答2:


Microsoft.IdentityModel is used by WIF in .NET 4.0 and version before. System.IdentityModel is to be used in .NET 4.5 and beyond. More details here http://msdn.microsoft.com/en-us/library/jj157091.aspx



来源:https://stackoverflow.com/questions/4751125/microsoft-identitymodel-vs-system-identitymodel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!