I have my web application running in iis 7 and C# 4.0, I am getting the user identity as null, I need to get the windows username and password. What I need to do ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Make sure the site set up to require windows authentication in web.config. See here for starters:
http://msdn.microsoft.com/en-us/library/532aee0e.aspx
Then make sure the page you are working on is in a folder that requires authenticated visitors (again web.config)
http://msdn.microsoft.com/en-us/library/wce3kxhd.aspx
When you say you need to ‘get the windows username and password’ does that mean you want to retrieve these in your code. You will not be able to get the password – Windows won’t provide that to asp.net.