This is quite odd. I've tried
numerous things, none of which work.
I'm trying to use Cassette with an
ASP.NET web forms projects, and it's working very well. On my local environment (IIS Express). Unfortunately, as soon as I deploy it to our test servers (in Amazon's EC2), it stops working as expected. I believe we're using IIS 7 in the cloud.
There are a couple of symptoms: first, cassette.axd (as in, the web UI) no longer works - it fails with a 404 file or directory not found. I'm fairly sure that the modules and handlers configuration is correct (since it works fine in my local environment), and I'm also fairly sure that .axd handlers are working in general, since I'm using other projects (like ELMAH and Glimpse) which use such handlers. But cassette.axd console 404's consistently. The odd part is that normal asset bundling and compression off of the cassette.axd path functions. Our JS and CSS files are compressed (using the AJAX minifier) and the URL is off of the /cassette.axd handler.
Second, the compression works incorrectly. The AJAX minifier breaks some of our code, so we decided to configure the YUI minifier instead, using a class that implements from IJavaScriptMinifier. Unfortunately, in the test environment, cassette seems to completely ignore our configuration, and uses the AJAX minifier anyway. I'm not sure if it matters, but we're using "dynamic" compilation via App_Code.
Can anyone think of a reason why this is happening?
Here's an excerpt from our Web.config:
<cassette debug="false" />
<system.diagnostics>
<sources>
<source name="Cassette" switchName="CassetteSwitch" switchType="System.Diagnostics.SourceSwitch" />
</sources>
<switches>
<add name="CassetteSwitch" value="All" />
</switches>
</system.diagnostics>
<system.web>
<httpModules>
<add name="CassetteHttpModule" type="Cassette.Aspnet.CassetteHttpModule,Cassette.Aspnet" />
</httpModules>
<httpHandlers>
<add path="cassette.axd" verb="*" type="Cassette.Aspnet.CassetteHttpHandler,Cassette.Aspnet"/>
</httpHandlers>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="CassetteHttpModule" type="Cassette.Aspnet.CassetteHttpModule, Cassette.Aspnet" />
</modules>
<handlers>
<add name="CassetteHttpHandler" path="cassette.axd" verb="*" allowPathInfo="true"
type="Cassette.Aspnet.CassetteHttpHandler, Cassette.Aspnet"/>
</handlers>
</system.webServer>