Unable to access the IIS metabase

2020-07-03 04:24发布

An ASP.NET web project loads with up the solution, but I get this error

The Web Application Project is configured to use IIS. Unable to access the IIS metabase. You do not have sufficient privilege to access IIS web sites on your machine.

How can this be solved?

9条回答
成全新的幸福
2楼-- · 2020-07-03 05:05

Have you registered the .NET framework with IIS? You need to run the aspnet_regiis.exe utility found at %WindowsDir%\Microsoft.NET\Framework\vx.y.zzzz\. Run it as administrator as follows:

aspnet_regiis.exe -i 

-i : Installs the version of ASP.NET that is associated with Aspnet_regiis.exe and updates the script maps at the IIS metabase root and below. Only the script maps for applications that use an earlier version of ASP.NET are updated. Applications that use a later version are not affected.

Find out more about the utitlity here.

查看更多
你好瞎i
3楼-- · 2020-07-03 05:15

An answer that worked for me can be found here:

https://stackoverflow.com/a/17460774/3005965

Basically, go to %systemroot%/inetsrv/config. When prompt appears saying you need admin privileges, click Continue.

This should clear up your issue.

查看更多
男人必须洒脱
4楼-- · 2020-07-03 05:15

This error also occurs if you modified your Machine.config and added some "invalid lines": For example, I added some appSettings, to the configuration section (which IIS didn't like).

查看更多
登录 后发表回答