In the solution explorer pane, select a web project and press F4 . (do not right click + properties, these are different)
In the panel properties:
Windows Authentication : Enable
Anonymous Authentication : Disabled
In Web.config: <authentication mode="Windows"></authentication>
Get username:
HttpContext.Current.User.Identity.Name OR User.Identity.Name
Launch the Happy Days project.
source share