tjanczuk/iisnode — Issue #93: Unlocking handlers section on machines without ASP.NET installed
Author: valentiniliescu
Created: 2011-12-02 06:24:33+00:00
State: open

On a machine without ASP.NET installed, I get this error when trying to view the samples in IIS:

*HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".*

This happens because, by default, the handlers section is locked at server level (applicationHost.config).
The solution is to either:
1. Install ASP.NET, that unlocks the section, or
2. Add unlocking to the setupsamples.bat script
```echo Unlocking handlers section
%appcmd% unlock config -section:handlers
if %ERRORLEVEL% neq 0 (
echo Installation failed. Cannot unlock handlers section
exit /b -1
)
echo ...success```
This seems to be safe, if the section is already unlocked by a previous script execution or ASP.NET, the config file is not modified