Working with ASP.NET Unit Tests
In Microsoft Visual Studio Team System Test Edition, VSTestHost is the process that, by default, hosts unit tests. Specifically, it hosts unit tests that test methods of non-Web applications. But you can also test methods that are part of ASP.NET sites or projects, by running ASP.NET unit tests. By definition, an ASP.NET unit test is a unit test that runs not under the VSTestHost process but rather in the same environment in which the production code will run. For this, you can choose either IIS or the ASP.NET Development Server.
If you are running Windows Vista, you must run Visual Studio as an administrator to run ASP.NET unit tests. If you run Visual Studio as a normal user, you can create a Web site and create and run ASP.NET tests, but the tests will fail. To run Visual Studio as an administrator, right-click Microsoft Visual Studio 2005 and then click Run As Administrator. If you are prompted to Continue, or to Allow the process to run, click Continue or Allow, respectively. If you are prompted to supply logon credentials for a user with administrator permissions, you must supply those credentials to successfully run ASP.NET unit tests. For more information about security in Windows Vista, see User Account Control Overview.