Owen Davies
Owen Davies

Reputation: 149

IHttpModule Error event not firing for non aspx pages

I've created a module and hosting it in iis7 integrated mode.

The BeginRequest event always get triggered for any request both aspx and html/php/whatever extension.

But the Error event only triggers for aspx extensions, but it works in cassini.

Tried: <modules runAllManagedModulesForAllRequests="true">

It's registered in system.webserver aswell as system.web.

Any ideas why this behavior happens?

Upvotes: 3

Views: 354

Answers (1)

John Wu
John Wu

Reputation: 52240

Alas, you won't get any; IIS will only raise error events for managed handlers.

Just brainstorming here: If you'd like to capture an error result from PhP, you might try handling EndRequest or PostRequestHandlerExecute and inspecting the HTTP status code for a 500, that sort of thing. That's not exactly the same as handling an error event but it might work for you.

Upvotes: 1

Related Questions