我有一个非常基本的空asp.net应用程序,并将nuget包dotless添加到项目中。
一旦我这样做,我得到服务器错误
The requested page cannot be accessed because the related configuration data for the page is invalid.
据我所知,这可能是由于读取web配置文件中的信息时出现问题。
<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>
它发生在读取configSections
时
我该如何解决这个问题?
发现问题。configSections
需要位于configuration
内部