sbornstein2
asked on
Forms Authentication App - Need User Identity from the start Help!
Hello all,
I have an app that uses forms auth that was working fine on my localhost but of course when I place it out on IIS no dice. I have a home page the user hits in the site under the root where the web.config lives as well of course that uses forms auth. In the home page I need to check if the user is a certain type then redirect based on if they are. I was trying to use:
Request.ServerVariables["L OGON_USER" ]
But that does not work of course it's empty. So how can I do this either off a global.asax session start or whatever I need to do. I am really hoping I don't have to pull out the redirect pages and code from this main app as I want it to live there. I somehow need the user identity.
I have an app that uses forms auth that was working fine on my localhost but of course when I place it out on IIS no dice. I have a home page the user hits in the site under the root where the web.config lives as well of course that uses forms auth. In the home page I need to check if the user is a certain type then redirect based on if they are. I was trying to use:
Request.ServerVariables["L
But that does not work of course it's empty. So how can I do this either off a global.asax session start or whatever I need to do. I am really hoping I don't have to pull out the redirect pages and code from this main app as I want it to live there. I somehow need the user identity.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks
Context.User.Identity.Name
Check the MSDN article - http://msdn.microsoft.com/en-us/library/xdt4thhy(v=vs.100).aspx
Hope it helps u...