I'm implementing corporate website with asp.net mvc and want to use new ASP.NET Identity framework. Is it possible to integrate ActiveDirectory authorization with ASP.NET Identity? Any samples how to do it?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Yes it's possible using a claim based authentication. It's integrated to .Net 4.5 now (before it was called WIF).
You can use Thinktucture, which is a very robust authentication provider it has a full example on how to integrate ADFS. Here is a link for it.
Here is another way to do it for an MVC4 app - MVC 4 and ADFS integration guide included
Here's a solution for MVC5 Web app using ADFS On-Premises Organizational Auth and Visual Studio 2013 localhost development
If you don't want to use ADFS you can use the
ActiveDirectoryMembershipProvider
. It works with Windows authentication and here's an post of using it with Forms authentication - Chris Schiffhauer - Implement Active Directory Authentication in ASP.NET MVC 5: