Global constructor called twice

  • Thread starter Thread starter Manuel Vázquez Acosta
  • Start date Start date
M

Manuel Vázquez Acosta

I found out that the constructor for the Global (Global.asax) component is
called twice. The first time the Application_Start is called, while the
second is not.
Is this documented somewhere out there?

So, any instance variable iniatilizated in the Application.Start, will be
discarded the second time the Global constructor is called.

Regards,
Manuel.
 
I found out that the constructor for the Global (Global.asax)
component is
called twice. The first time the Application_Start is called, while
the
second is not.
Is this documented somewhere out there?
So, any instance variable iniatilizated in the Application.Start, will
be discarded the second time the Global constructor is called.

Regards,
Manuel.

The first time is special (check reflector, they actually call it special).

Generally speaking, they want you to do whatever you need to do in the application_start
method.

hth, Ryan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top