Changing the Framework version requires a restart of the W3SVC service. Alternatively, you can change the Framework version without restarting the W3SVC service by running: aspnet_regiis.exe-norestart-s IIS-Viirtual-Path
Do you want to continue (this will change the Framework version and restart the W3SVC service )?
Multiple frameworks coexist on the computer. When you build a site, select the asp.net version. The above prompt is displayed.
Solution:
Open C:/WINDOWS/system32/inetsrv
MetaBase. xml
Find your iis directory name.
My "default website" gets
/LM/W3SVC/14616328120FALSE: 8080:Default website"/>
Cmd input: C:/WINDOWS/Microsoft. NET/Framework/v2.0.50727/aspnet_regiis.exe-norestart-s W3SVC/1461632812/Root
Restart IIS
In addition, in some cases, the default IIS website is deleted and the "default website" node cannot be found in MetaBase. xml.
Try it.
C:/WINDOWS/Microsoft. NET/Framework/v4.0.30319/aspnet_regiis.exe-norestart-s W3SVC