Barnum
asked on
Get Windows login in ASP.NET website on IIS 7
In my asp.net 4.0 website I am using windows login user name to login in my website without asking credential if that windows login user is in DB if that user not in db then asking credential and authenticate against db .
To achieve above goal I implemented form and widows authentication in my website.
When I ran website through VS 2010(Dev. environment) I get actual windows login name but if I ran website on IIS 7 then I get “IUSER” as a windows login.
Following command I am trying
"HttpContext.Current.Reque st.LogonUs erIdentity .Name" get "IUSR" (NT AUTHORITY\IUSR) on IIS 7.
"HttpContext.Current.User. Identity.N ame" get empty on IIS 7.
How can i get actual windows login on IIS 7 as well?
To achieve above goal I implemented form and widows authentication in my website.
When I ran website through VS 2010(Dev. environment) I get actual windows login name but if I ran website on IIS 7 then I get “IUSER” as a windows login.
Following command I am trying
"HttpContext.Current.Reque
"HttpContext.Current.User.
How can i get actual windows login on IIS 7 as well?
ASKER
i am already using this.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Yes, I already did this.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
I tried above solution.
Still not working for me.
Still not working for me.
ASKER
We settled on a different method of authentication. Thanks for all the the help, though!
<configuration>
<system.web>
<identity impersonate="true"/>
</system.web>
</configuration>
(http://msdn.microsoft.com/en-us/library/xh507fc5.aspx)