views:

42

answers:

1

ASP.NET global.asax Application_Error fires for all pages except .php extensions.

On IIS:

  • "Web Service Extensions" does have PHP set to allowed.
  • I have the PHP isapi filter on the web site.
  • I recycled my defaultAppPool.
  • Did the IIS reset.

Still i cannot get the Application_Error to fire when viewing a php page that does not exist. When browsing to a php file that does exist the browser displays it perfectly.

Any ideas out there?

Thanks! Lance

A: 

Uhm global.asax is only fired by the asp.net backend of iis. The PHP compiler has nothing to do with that and uses an totally different compiler etc.

In other words: not possible. And from an architectural standpoint I'm wondering why you would even want that.

Laurens Ruijtenberg
i need to trap possible bookmarked urls and redirect users to the new urls. old system=php and new system=.net and this is my dilemma.
lance
Thanks for the response Laurens. I'll have to think of a plan B.
lance
@lance: You could write a HttpHandler for IIS that processes all the old urls :)
Laurens Ruijtenberg
So realized that the old urls all go to 1 file - index.php - so will cater for it in that file. THANKS FOR THE HELP! OWE U 1 ;)
lance