【问题标题】:Error in web config when installing dotless安装 dotless 时 Web 配置出错
【发布时间】:2016-01-09 22:08:01
【问题描述】:

我有一个非常基本的空 asp.net 应用程序,并将 nuget 包 dotless 添加到项目中。

一旦我这样做,我就会收到服务器错误

The requested page cannot be accessed because the related configuration data for the page is invalid.

据我了解,这可能是由于读取网络配置文件中的信息时出现问题。

<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的时候

我该如何解决这个问题?

【问题讨论】:

    标签: asp.net dotless


    【解决方案1】:

    发现问题。 configSections需要坐在里面configuration

    【讨论】:

      猜你喜欢
      • 2019-03-20
      • 2016-09-10
      • 1970-01-01
      • 1970-01-01
      • 2014-03-05
      • 1970-01-01
      • 2020-07-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多