ASP.Net MVC4 User.Identity.Name getting empty even though set authentication mode as 'Windows'

后端 未结 2 1247
挽巷
挽巷 2021-01-19 13:28

I am working on ASP.Net MVC-4 application. I have to implement windows authentication. I have set authentication mode as \'Windows\' in web.config file as shown below.

2条回答
  •  自闭症患者
    2021-01-19 13:44

    Windows authentication is performed by IIS to establish our managed code User.Identity. Therefore, you need to enable Windows Authentication in your IIS, and in order to force the user to authenticate before being able to access our application, you need to disable Anonymous Authentication

    enter image description here

提交回复
热议问题