If an ASP.NET application runs in a development environment, the P:System.Environment.UserName property returns the name of the current user. In a published ASP.NET application, this property returns the name of the application pool account (such as Default AppPool).