0

we have written some code in httpmodule INIT method, which will execute only once. The code connects to third party web service and sometimes there could be a chance of getting error (like web service is down). we are handling application errors globally using Application_Error event.

when the error occurs from init method, it is not redirecting to error page. please help.

development: share point site.

dotnetmirror.com
  • 293
  • 2
  • 10

1 Answers1

0

My guess would be this is b/c the methods that ultimately call your Init() method don't have the same behavior of calling Application_Error on unhandled exceptions.

But...is this really the behavior you want? It seems like if a web service call fails on one request, you'd like it to return an error to the user, but try again on the next request. Otherwise you'll have to restart your app to get Init() to run again.

joelt
  • 2,672
  • 2
  • 24
  • 32