Error display:
An error occurred while accessing the IIS metadatabase.
Note: An unhandled exception occurs during the execution of the current Web request. Check the stack trace information for details about the error and the source of the error in the code.
Exception details: System. Web. Hosting. HostingEnvironmentException: An error occurred while accessing the IIS metabase.
The process account used to run ASP. NET must have read access to the IIS metabase (for example, IIS: // servername/W3SVC. For information about how to modify metadatabase permissions, see http://support.microsoft.com /? Kbid = 267904.
The solution is as follows:
1. Run the command in CMD. Remember to use the CD command (follow the path below)
C: \ WINDOWS \ Microsoft. NET \ Framework \ v2.0.50727
Aspnet_regiis-ga ASPNET
2. The following command in CMD displays a message indicating that the ASPNET permission is granted.
3. Enter the following in the CMD window:
Iisreset
It will prompt that IIS is shutting down similar things. After it is restarted, the problem will be solved!