我确实可以在我的 HTTPModule 中更新用户的会话变量,但是在我看来,这是不可能的。
更新: 我的代码当前正在 OnBeginRequest ()
事件处理程序中运行。
更新: 根据到目前为止收到的建议,我尝试在我的 HTTPModule 中添加这个到 Init ()
例程中:
AddHandler context.PreRequestHandlerExecute, AddressOf OnPreRequestHandlerExecute
但是在我的 OnPreRequestHandlerExecute
例程中,会话状态仍然不可用!
谢谢,如果我错过了什么,我道歉!