2013-07-23 3 views
27

Hiにドットなしを追加した後、私は私の地元の.net4のウェブサイト上でdotlessを実行しようとしているHTTPエラー500.23私の地元のウェブサイト

私のWeb構成は次のようになります。ここでは

<?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"/>を追加

答えて

28

<?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> 
+0

これは私が実行するのに必要な古代のプロジェクトのための私の問題を修正しました!ありがとう+1。 – JonH

+0

この回答を受け入れ可能とマークできますか? – Dragomok

11

<validation validateIntegratedModeConfiguration="false"/>tells IIS to ignore configuration issuesを働きました。そのような問題の1つは、dotlessがsystem.websystem.webServerにハンドラを自動的に追加するという事実のようです。前者のセクションは従来のアプリケーションプールモードで使用され、後者は新しい統合アプリケーションプールモードで使用されます。私は統合モードを使用しているので、system.web内のハンドラを削除すると同様に役立ちました。

+2

ありがとうございました!私はsystem.webセクションからhttpHandlerセクションを削除しました。すべてOKです。 – Bradley

+0

これは、根本的な問題に実際に対処するので、その上にバンダイを置くのではなく、答えになるはずです。 – Froopy

0

webserverセクションに<validation validateIntegratedModeConfiguration="false"/>を追加する必要がありました。また、configSectionsを自分のConfigurationの最初の要素に移動する必要がありました。

<configuration> 
<configSections> 
<section name="dotless" type="dotless.Core.configuration.DotlessConfigurationSectionHandler, dotless.Core" /> 

関連する問題