嗨,我试图在本地的.net4网站上运行
dotless
我的网络配置如下所示:
<?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <section name="dotless" type="dotless.Core.configuration.DotlessConfigurationSectionHandler,dotless.Core" /> </configSections> <system.web> <compilation debug="true" targetFramework="4.0" /> <httpHandlers><add path="*.less" verb="GET" type="dotless.Core.LessCssHttpHandler,dotless.Core" /></httpHandlers></system.web> <dotless minifyCss="false" cache="true" web="false" /> <system.webServer> <handlers> <add name="dotless" path="*.less" verb="GET" type="dotless.Core.LessCssHttpHandler,dotless.Core" resourceType="File" preCondition="" /> </handlers> </system.webServer> </configuration>
这是我得到的错误
HTTP Error 500.23 - Internal Server Error An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode. Most likely causes: This application defines configuration in the system.web/httpHandlers section.
你能帮忙吗?
解决方法
添加< validation validateIntegratedModeConfiguration =“false”/>工作
<?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <section name="dotless" type="dotless.Core.configuration.DotlessConfigurationSectionHandler,dotless.Core" /> </configSections> <system.web> <compilation debug="true" targetFramework="4.0" /> <httpHandlers> <add path="*.less" verb="GET" type="dotless.Core.LessCssHttpHandler,dotless.Core" /> </httpHandlers> </system.web> <dotless minifyCss="false" cache="true" web="false" /> <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> </configuration>