jetheredge/SquishIt — Issue #115: SquishIt 0.8.2 breaks cached render from Application_Start
Author: swaj
Created: 2011-11-28 15:13:54+00:00
State: open

Following the wiki, here:

https://github.com/jetheredge/SquishIt/wiki/Using-SquishIt-programmatically-without-the-file-system

I have added a method called BundleEverything() which performs all bundling. When called within Application_Start() as recommended in the wiki article, I receive the following exception:

```
Request is not available in this context

Description: An unhandled exception occurred during the execution of the current web request.
Please review the stack trace for more information about the error and where it originated in
the code.

Exception Details: System.Web.HttpException: Request is not available in this context
```

When I remove the call to BundleEverything() from Application_Start() and use it in Application_BeginRequest(), it works as expected. I'm not sure if this is the intended behavior, but if it is, the wiki page should be updated.