Multiple choice technology web technology

Which of the following code will return the account on which ASP.NET is running?

  1. Account.Username

  2. User.Name

  3. Page.Username

  4. Environment.Username

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Environment.Username retrieves the Windows identity account name under which the current thread is executing. For ASP.NET applications, this returns the application pool identity (such as NETWORK SERVICE, IIS_APPPOOL, or a custom service account) configured in IIS.