I have a very basic empty asp.net application and added the nuget package dotless to the project.
As soon as I do that I get the server error
The requested page cannot be accessed because the related configuration data for the page is invalid.
and in my understanding it could be due to a problem reading the information in the web config file.
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5"/>
<httpRuntime targetFramework="4.5"/>
<httpHandlers>
<add path="*.less" verb="GET" type="dotless.Core.LessCssHttpHandler, dotless.Core"/>
</httpHandlers>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<handlers>
<add name="dotless" path="*.less" verb="GET" type="dotless.Core.LessCssHttpHandler,dotless.Core" resourceType="File" preCondition=""/>
</handlers>
</system.webServer>
<configSections>
<section name="dotless" type="dotless.Core.configuration.DotlessConfigurationSectionHandler, dotless.Core"/>
</configSections>
<dotless minifyCss="false" cache="true" web="false" strictMath="false"/>
</configuration>
It happens at the point of reading configSections
How could I resolve this?
Found the problem. configSections
need to sit inside configuration