In my MVC application, I want to display the table in the cshtml file if the current user in the log is x people. I use Windows authentication and I made the following changes to the web.config file.
<authentication mode="Windows"> </authentication>
And in my controller, when I try to access the current username, I don't get any username. I am trying to do the following:
ViewBag.LogInUserName = Request.RequestContext.HttpContext.User.Identity.Name;
This line above worked. But I do not know what happened now. I have also posted my application on IIS now.
source share