An error when publishing the site
Lock is the default setting (overrideModeDefault = "Deny"), or by including overrideMode = "Deny" or the old allowOverride = "false" position marker explicitly set.
Solution
Administrator Open a command line, run the following command
%windir%\system32\inetsrv\appcmd unlock config -section:system.webServer/handlers
%windir%\system32\inetsrv\appcmd unlock config -section:system.webServer/modules