Stefan Motz
asked on
Windows Server 2012 - Request.ServerVariables("LOGON_USER") does not work
Hi Experts,
I moved my site to Windows Server 2012 and now I can't capture the LOGON_USER.
This worked fine in the past, but since the site is on the new server it won't return anything:
<%=Request.ServerVariables ("LOGON_US ER")%>
Perhaps I have to change something in the IIS Manager.
I'd really appreciate your help.
I moved my site to Windows Server 2012 and now I can't capture the LOGON_USER.
This worked fine in the past, but since the site is on the new server it won't return anything:
<%=Request.ServerVariables
Perhaps I have to change something in the IIS Manager.
I'd really appreciate your help.
you have authentication mode set to windows in IIS?
ASKER
Where do I have to set the authentication mode to windows?
When I double click "Authentication" I can see that the status of Anonymous Authentication is Enabled and ASP.NET Impersonation is Disabled.
No other options there.
When I double click "Authentication" I can see that the status of Anonymous Authentication is Enabled and ASP.NET Impersonation is Disabled.
No other options there.
is this iis 7.5?
ASKER
It is IIS 8
have a look below to make sure you have the feature available:
http://blogs.msdn.com/b/david_burgs_blog/archive/2013/11/05/installing-adding-iis-windows-authentication-feature-in-windows-8.aspx
http://blogs.msdn.com/b/david_burgs_blog/archive/2013/11/05/installing-adding-iis-windows-authentication-feature-in-windows-8.aspx
ASKER
No matter how many times I try getting to the "Turn Windows features on or off" screen, I always get directed to the "Add Roles and Features Wizard".
I can't get to the third screenshot (Windows Features), where Internet Information Services is highlighted in yellow.
Instead I get redirected to the "Add Roles and Features Wizard". Maybe I have to add other roles and features to be able to view Windows Features?
I can't get to the third screenshot (Windows Features), where Internet Information Services is highlighted in yellow.
Instead I get redirected to the "Add Roles and Features Wizard". Maybe I have to add other roles and features to be able to view Windows Features?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I finally was able to get there and check Windows Authentication. Unfortunately this didn't help either. I even restarted the server, but nothing changed.
Request.ServerVariables("L OGON_USER" ) doesn't display anything. When I try the following I get the 401 Error:
<%
If Request.ServerVariables("L OGON_USER" ) = "" Then
Response.Status = "401 Access Denied"
Response.End
End If
%>
<%=Request.ServerVariables ("LOGON_US ER")%>
Request.ServerVariables("L
<%
If Request.ServerVariables("L
Response.Status = "401 Access Denied"
Response.End
End If
%>
<%=Request.ServerVariables
did you set it to windows authentication after you installed it?
ASKER
I finally was able to get there and check Windows Authentication.
Under Sites Windows Authentication showed up and I enabled it. Now it's working, thank you very much for your help.
Under Sites Windows Authentication showed up and I enabled it. Now it's working, thank you very much for your help.
ASKER
Thank you very much, it's finally working!
Hi
Sorry to post old question,
Windows Server 2012 - Request.ServerVariables("L OGON_USER" ) does not work me too.
I have tried all the settings in Authentication. Anonymous is disable Windows Authentication enabled
but Request.ServerVariables("L OGON_USER" ) is still empty for me. :(
Sorry to post old question,
Windows Server 2012 - Request.ServerVariables("L
I have tried all the settings in Authentication. Anonymous is disable Windows Authentication enabled
but Request.ServerVariables("L
@Shivaji - There are times when LOGIN_USER will come up empty, if you're going through a proxy and other certain network configurations (I can't remember the specifics at this time).
I recommend opening a new question so that more experts will see it and provide answers for you.
in the meantime, you can try googling:
Request.ServerVariables("L OGON_USER" ) will come up empty
I recommend opening a new question so that more experts will see it and provide answers for you.
in the meantime, you can try googling:
Request.ServerVariables("L