简体   繁体   中英

Connecting ASP.NET MVC Web App to use Windows credentials for user login?

I'm trying to build an ASP.NET MVC5 site for intranet use. I need to install it on a server and connect the login form to use Windows credentials for users logging into the site. Its a large corporation with several levels of IT and Security to get through for anything 'special', so I'm looking for simple and no change requests if possible.

I've been searching and reading online for several days, run through the Visual Studio wizards, tried various configurations, researched the IdenitityStoreManager and IdentityAuthenticationManager interfaces ...

I can easily build the site to use individual accounts, which seems to have the behavior I want, except that it wires in a database. I don't want the database, I want it to use the Windows/Domain credentials for access.

I've found lots of info about hooking up to AD/ADFS in Azure, and even a little for On-Premises, but it seems far heavier than I want. I'm guessing I can do what I want in a little bit of configuration magic, but ?

Are there any good examples or blogs available for this specific usage ?

Google found lots of answers

For example this one is good enought, it's about MVC 3, but it's the basics of this subject

Main configuration is happened in web.config file:

<authentication mode="Windows">
</authentication>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM