If you're in a domain, probably and have windows authentication enabled and basic turned off, probably. If you're not part of a domain and/or don't have windows authentication turned on, probably not. You'll probably get the user account the application
pool is running under, if anything.
Don't forget to mark useful responses as Answer if they helped you towards a solution.
My question is that when I run the VS 2015, and run the following statement:
System.Web.HttpContext.Current.User.identity.Name
Will I get the Windows Logon username?
To achieve this, please enable the Windows Authentication on IIS Express using the following steps:
Click on your project in the Solution Explorer to select the project.
If the Properties pane is not open, open it (F4).
In the Properties pane for your project: a) Set "Anonymous Authentication" to "Disabled". b) Set "Windows Authentication" to "Enabled".
Best Regards,
Jean
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
56 Points
657 Posts
What Will be the Username Value If I Debuged ASPX Webform on IIS 8.0 - Windows 2012 Server?
Oct 23, 2017 10:38 PM|alihusain_77|LINK
I am running on Windows 2012 Server, IIS 8.0,
The website TrackingDesk is added to this sever.
C:\inetpub\wwwroot\TrackingDesk\...
For the purpose of debugging, I install Visual Studio 2015.
My question is that when I run the VS 2015, and run the following statement:
Will I get the Windows Logon username?
All-Star
26071 Points
5892 Posts
Re: What Will be the Username Value If I Debuged ASPX Webform on IIS 8.0 - Windows 2012 Server?
Oct 23, 2017 11:58 PM|markfitzme|LINK
If you're in a domain, probably and have windows authentication enabled and basic turned off, probably. If you're not part of a domain and/or don't have windows authentication turned on, probably not. You'll probably get the user account the application pool is running under, if anything.
Contributor
6490 Points
2525 Posts
Re: What Will be the Username Value If I Debuged ASPX Webform on IIS 8.0 - Windows 2012 Server?
Oct 24, 2017 02:36 AM|Jean Sun|LINK
Hi alihusain,
To achieve this, please enable the Windows Authentication on IIS Express using the following steps:
Best Regards,
Jean
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.