Custom HttpModule for IIS 7 for integrated

前端 未结 3 1712
猫巷女王i
猫巷女王i 2021-02-15 20:41

I\'m having troubles with a custom Error handler I built. It should be a HttpModule, but when I add it to my web.config\'s system.webServer/modul

3条回答
  •  天涯浪人
    2021-02-15 21:26

    I was experiencing the same problem of a handler that is not getting triggered, by doing following change to the above code helped me to resolve this issue. Instead of creating a new event handler I just attached the method with same signature to that event.

    application.Error += ErrorHandler;
    

    This works for me, still analyzing what is the reason behind this way attaching a handler works in IIS7.

提交回复
热议问题