Debugging help - when does Application_Start run in global.asax file?
Here is a snippet from my Global.asax:
<script runat="server">
void Application_Start(object sender, EventArgs e) {
// log this call
EventLogger.Log("ApplicationStart");
}
void Application_BeginRequest(object sender, EventArgs e) {
// log what the user is doing
UsageLogger.Log(UsageLogger.GetServerVariables());
}
</script>
When I open the log, I see a lot of ApplicationStart calls alternating with use calls. Why does my application seem to be reloading?
+2
source to share
2 answers
Application_Start runs once when the application starts. Application_BeginRequest is executed on every request.
This link helped in a similar question here .
ASP.NET Example: Lost Session Variables and Reloading Domain Applications
+2
source to share