VSPerfASPNetCmd is a new Visual Studio 2010 tool that helps you profile ASP.Net websites from the command-line. Recently I noticed an error message which didn’t cover one common situation so I thought I’d write about it. Here’s an example:
> VSPerfASPNetCmd.exe http://localhost
Microsoft (R) VSPerf ASP.NET Command, Version 10.0.0.0
Copyright (C) Microsoft Corporation. All rights reserved.
VSP 7008: ASP.net exception: "The website metabase contains unexpected information or you do not have permission to access the metabase. You must be a member of the Administrators group on the local computer to access the IIS metabase. Therefore, you cannot create or open a local IIS Web site. If you have Read, Write, and Modify Permissions for the folder where the files are located, you can create a file system web site that points to the folder in order to proceed."
The information in the error is correct and it is worth checking to make sure that you are running from an elevated command prompt, but it does miss a common configuration issue. In order to query for information from the IIS metabase, certain IIS components need to be installed.
To check this in Windows 7:
- Open ‘Control Panel\Programs\Programs and Features’ (or run ‘appwiz.cpl’).
- Choose ‘Turn Windows features on or off’.
- In the ‘Internet Information Services’ section, make sure that the following options are selected.
The non-default options include:
- IIS 6 Scripting Tools
- IIS 6 WMI Compatibility
- IIS Metabase and IIS 6 configuration compatibility
- Windows Authentication