Windows Authentication with ASP.NET MVC

后端 未结 3 1052
悲&欢浪女
悲&欢浪女 2020-12-24 03:58

I\'ve built a custom login system for my asp.net mvc 1.0 web application as I store large amounts of user data for each user (I decided against trying to add custom tables f

3条回答
  •  -上瘾入骨i
    2020-12-24 04:41

    If you have Windows Auth enabled on your site then you should be able to use User.Identity.Name to get their NT/Active Directory user name of the currently logged in user, and match that to a column in your users table.

提交回复
热议问题