Monday, June 14, 2010

'.ashx' has not been pre-compiled, and cannot be requested.

Recently we had to deploy a Asp.Net .Net 3.5 website to a IIS7 Server (this application was previously hosted only on IIS 6.*). All went fine, just that some handlers (used to generate thumbnails - .ashx) when accessed were generating the following error:
'.ashx' has not been pre-compiled, and cannot be requested.
Afer a little investigation we came up with 2 solutions:
  • First solution - not recommended: App Pools - Managed Pipeline Mode changed it from Integrated to Classic Not recommended because you are basically giving up an all good IIS7 functionality - the common event pipeline. (More info)
  • Second solution - recommended: Move/copy the content of
    system.web -
    - handlers

    In this case you'll might need to consider several other attributes for a handler (More info)
We wrote this blog entry because searching by the actual error message we didn't find any useful result. Hope will help.

No comments:

Post a Comment

Blog powered up by Blogger