开发者

Security Exception running dotless

开发者 https://www.devze.com 2023-04-09 02:15 出处:网络
I\'m getting a Security Exception when I attempt to access a .less file in IIS7. The exception text is:

I'm getting a Security Exception when I attempt to access a .less file in IIS7.

The exception text is:

Security Exception

The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

I've added the following to my web.config file:

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

<httpHandlers>
  <remove verb="*" path="*.asmx" />
  <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
  <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Cu开发者_C百科lture=neutral, PublicKeyToken=31BF3856AD364E35" />
  <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
  <add type="dotless.Core.LessCssHttpHandler,dotless.Core" path="*.LESS" verb="*" validate="false" />
</httpHandlers>

<dotless minifyCss="false" cache="false" />  

<system.webServer>
  <handlers>
    <add name="dotLess" path="*.less" verb="*" type="dotless.Core.LessCssHttpHandler" resourceType="Unspecified" preCondition="integratedMode" />
  </handlers>
</system.webServer>

Any ideas?

I'm running a MVC2 .Net application.


have you added the MIME type to IIS? if no add extension .less MIME type 'text/css'

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号