VS2010 development web server does not use integrated-mode HTTP handlers/modules

Posted by Domenic on Stack Overflow See other posts from Stack Overflow or by Domenic
Published on 2010-04-25T12:25:49Z Indexed on 2010/04/25 12:33 UTC
Read the original article Hit count: 265

I am developing an ASP.NET MVC 2 web site, targeted for .NET Framework 4.0, using Visual Studio 2010.

My web.config contains the following code:

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true">
        <add name="XhtmlModule" type="DomenicDenicola.Website.XhtmlModule" />
    </modules>
    <handlers>
        <add name="DotLess" type="dotless.Core.LessCssHttpHandler,dotless.Core" path="*.less" verb="*" />
    </handlers>
</system.webServer>

When I use Build > Publish to put the web site on my local IIS7 instance, it works great.

However, when I use Debug > Start Debugging, neither the HTTP handler nor module are executed on any requests.

Strangely enough, when I put the handler and module <add /> tags back into <system.web /> under <httpHandlers /> and <httpModules />, they work. This seems to imply that the development web server is running in classic mode.

How do I fix this?

© Stack Overflow or respective owner

Related posts about visual-studio

Related posts about httpmodule