Get Domain User ID in ASP.NET

后端 未结 2 456
温柔的废话
温柔的废话 2020-12-18 12:46

I have a ASP.NET application where an employee logs into Windows and then they have to select their name from a long list of names and log in into the application.

W

2条回答
  •  执笔经年
    2020-12-18 13:23

    Try this:-

    System.Web.HttpContext.Current.User.Identity.Name
    

    Also check this forum.

    UPDATE:-

    1) Please check that you have disabled anonymous mode in IIS

    2) Also do check that you have set the application to autheticate the user details like this:-

      
         
           
        
    

    or like this:-

       
          
             
         
    

    3) You can you can either configure IIS in Control Panel so that your site (or machine) uses Windows authentication and denies anonymous access

提交回复
热议问题