Metabase error when trying to use Visual Studios Profiler on an ASP.Net site

C#asp.netProfiling

C# Problem Overview


I'm trying to run the performance wizard on an ASP.Net website. However, whenever I try to start it I get the following error.

"The website 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 matabase. Therefore, you cannot create or open a local IIS website. If you have Read, Write, and Modify Permissions for the folder where the files are located, you can create a file system website that points to the folder in order to proceed"

I am an Administrator on my machine. Tried googling but came up with nothing. Anyone run it before and know how to deal with it?

C# Solutions


Solution 1 - C#

Update 2019: The link from msdn that answers this question is now a dead link, but can be found on wayback machine here:

https://web.archive.org/web/20160223061509/http://blogs.msdn.com/b/profiler/archive/2010/07/23/tip-fixing-vsperfaspnetcmd-metabase-errors.aspx.

This page says:

> 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.

Windows features for VS profiler

> The non-default options include: > > - IIS 6 Scripting Tools > - IIS 6 WMI Compatibility > - IIS Metabase and IIS 6 configuration compatibility > - ASP.NET, > - Windows Authentication

Solution 2 - C#

I was getting this error in Visual Studio 2012 on Win 8.1 64-bit and I already had the IIS 6 compatibility items installed.

To fix the issue, I had to make sure that Visual Studio was getting run as an Administrator. (Right click shortcut -> Properties -> Shortcut -> Advanced -> Run as administrator)

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionKevinView Question on Stackoverflow
Solution 1 - C#Jon EgertonView Answer on Stackoverflow
Solution 2 - C#YodaAmINotView Answer on Stackoverflow