Unable to create the virtual directory. To access local IIS Web sites, you must install the following IIS components: IIS 6 Metabase and IIS 6 Configuration Compatibility ASP.NET

---------------------------
Microsoft Visual Studio
---------------------------
Unable to create the virtual directory. To access local IIS Web sites, you must install the following IIS components:

      IIS 6 Metabase and IIS 6 Configuration Compatibility
      ASP.NET

In addition, you must run Visual Studio in the context of an administrator account.

For more information, press F1.
---------------------------
OK  
---------------------------

I just received this error when I tried to create a new asp.net web app with vs2010/windows 7. The solution is you need to go to "Control Panel > Programs and Features > Turn Windows features on or off" and install at least the two missing components. After this is done you need to open visual studios command prompt and type "aspnet_regiis -i".

5 comments:

  1. Thank you,I was having the same problem and this seams to be the right answer.

    ReplyDelete
  2. An error occurred :0x8007b799
    You must have Administrative right on this machine

    ReplyDelete
  3. Plese give me suggetion how to resolve this

    ReplyDelete