How to find out which user account is running ASP.NET?
Use this code:
VB.NET
Response.Write("Windows Account which runs ASP.NET is: " & Environment.Username)
C#
Response.Write("Windows Account which runs ASP.NET is: " + Environment.Username);
If you debug your application in Visual Studio on localhost you'll get your user name. If you deploy ASP.NET web application on IIS 6.0 web server, you will probably get NETWORK SERVICE account, because that is default user running IIS.
Related articles:
1. Printing in ASP.NET
2. Can I use different programming languages in ASP.NET site?
Copyright © 2002-2008 Bean Software. All rights reserved.