Session changes done in application_Error rolled back after redirect

前端 未结 5 1562
感情败类
感情败类 2021-01-26 05:01

I have an asp.net application and I am trying to handle custom exception using Application_Error. It works nicely but I have new requirement to set the error data in Session obj

5条回答
  •  时光取名叫无心
    2021-01-26 05:40

    The problem might that the AcquireRequestState event might not have fired when the exception was raised in your application, you will be able to set a session value only after this particular event is fired as this is the stage where the application state is set

提交回复
热议问题