What actually causes Session_Start to be called?

前端 未结 4 1275
执笔经年
执笔经年 2021-01-17 19:45

In a little demo application that I\'m building I put code to initialize the database in the Global.Session_Start() event. However, I notice that this event does not fire w

4条回答
  •  孤街浪徒
    2021-01-17 20:21

    What Session Model do you use? In case of SQL Server backed sessions, it may not start a new sessions. In case of InProc, I think it should work. Application_Start has the issue of being sometimes triggered before the debugger can attach, as you pointed out.

    Do you use IIS or the Development Web Server? In case of IIS, this article suggest that you need to create it as an application first.

提交回复
热议问题