HttpContext.Current.User.Identity.Name returns null after LogOn. I am using IIS7.0 framework 4.0. and vs 2010. i have another project which targetFramework is 3.5. it works good. But targetFramework of my new project is 4.0. and when calling HttpContext.Current.User.Identity.Name it returns null
HttpContext.Current.User.Identity.Name returns null after LogOn. I am using IIS7.0 framework 4.0. and vs 2010.
Share
You should issue an HTTP redirect after logging in before being able to use this property. After the redirect you will be able to use it on subsequent requests. Here’s the usual pattern: