I have an issue I was hoping not to run into but did. So on my localhost I have an asp.net app that uses forms auth and I can't change it. That is all set in the solution root web.config. There is a subdirectory root that has its own web.config shown below. On my local in debug I can get the user logged on name fine with:
] also tried the Security Principal identity still both are empty on prod server with IIS7.
But when I installed on IIS7 it also has anonymous enabled as well as basic and window auth. I tried disabling anonymous access but got "Internet Explorer cannot display webpage". I know I can't mix auth mode either in a subdirectory or that errors. I really don't want to have to seperate out this stuff as it will be difficult but I have to get the windows auth name. It works fine on my localhost running through VS though of course.
In my root config I tried impersonate=true as well.
This is in my subfolder where I am trying to get the logged on user. The main root has the forms auth set in the web config auth settings.
Allow all users in this subfolder.
<allow users="*" />