views:

169

answers:

1

I have a module with custom ReleaseRequestState eventHandler. In this eventHandler i use HttpContext.Current.CurrentHandler, and just now revealed that in some situations (particularly - for *.css files) it can be NULL. How this can be, and how it can be correctly workarounded?

A: 

Probably because you have not registered a IHttpHandler in your web.config for 'handling' css files. Should look something like this:

<httpHandlers>
   <add verb="*" path="*.css" type="com.MyCo.MyCssHttpHandler, com.MyCo"/>
</httpHandler>

Your httpHandlers section probably already has sections for aspx and such

ryber