Why does Application_Start fire twice?

  • Thread starter Thread starter Rashad Rivera
  • Start date Start date
R

Rashad Rivera

I need to know why the Application_Start function fires twice when it
initializes. It is doing double work and messing up my process. Thanks for
your help

- Rashad
 
it can't really start twice. it has to start, end and start again so you
need to find out what is causing it to end. your first bet is to look up the
application event logs
 
I know why it is now, I was using the Respose.End and
Response.Redirect("url", true), which also calls the .End(). I read up on
this and found that this call causes an Exception. The MS documentation
says that this is deliberate in design. I fixed it now.

- Rashad Rivera

Alvin Bruney said:
it can't really start twice. it has to start, end and start again so you
need to find out what is causing it to end. your first bet is to look up the
application event logs

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Rashad Rivera said:
I need to know why the Application_Start function fires twice when it
initializes. It is doing double work and messing up my process. Thanks
for
your help

- Rashad
 
Hello Rashad,

Response.End should not be calling Application_End.
I know why it is now, I was using the Respose.End and
Response.Redirect("url", true), which also calls the .End(). I read
up on this and found that this call causes an Exception. The MS
documentation says that this is deliberate in design. I fixed it now.

- Rashad Rivera

it can't really start twice. it has to start, end and start again so
you need to find out what is causing it to end. your first bet is to
look up
the

application event logs

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"Rashad Rivera"
I need to know why the Application_Start function fires twice when
it
initializes. It is doing double work and messing up my process.
Thanks
for
your help
- Rashad
 
Back
Top