Application_Start in Global.asax doesnt fire!

Discussion in 'ASP .Net' started by gamesforums@hotmail.com, Oct 18, 2007.

  1. Guest

    Hi!

    I have some code within the Application_Start event in Global.asax
    that runs a sqlscript against my sql server to check the databas
    version. My problem is that sometimes the Application_Start event
    doesnt fire, it skips it and goes directly to my default.aspx file.

    I do the following:

    1. IISReset.
    2. Deploy application files.
    3. Start http://localhost/default.aspx

    Sometimes the Application_Start is fired, other times it doesnt. I
    have seen that this more often do happen in my production environment
    (IIS 6.0, Windows Server 2003) than on my developer machine.

    Any ideas?

    Mcad
     
    , Oct 18, 2007
    #1
    1. Advertising

  2. Mike Guest

    On your production server, if you've got a file named
    'PreCompiledApp.config, delete it.

    There's a KB article re this issue at
    <http://support.microsoft.com/default.aspx?scid=kb;EN-US;937095>

    Mike


    On 10/18/07 9:57 AM, in article
    ,
    "" <> wrote:

    > Hi!
    >
    > I have some code within the Application_Start event in Global.asax
    > that runs a sqlscript against my sql server to check the databas
    > version. My problem is that sometimes the Application_Start event
    > doesnt fire, it skips it and goes directly to my default.aspx file.
    >
    > I do the following:
    >
    > 1. IISReset.
    > 2. Deploy application files.
    > 3. Start http://localhost/default.aspx
    >
    > Sometimes the Application_Start is fired, other times it doesnt. I
    > have seen that this more often do happen in my production environment
    > (IIS 6.0, Windows Server 2003) than on my developer machine.
    >
    > Any ideas?
    >
    > Mcad
    >
     
    Mike, Oct 18, 2007
    #2
    1. Advertising

  3. Guest

    On 18 Okt, 16:09, Mike <> wrote:
    > On your production server, if you've got a file named
    > 'PreCompiledApp.config, delete it.
    >
    > There's a KB article re this issue at
    > <http://support.microsoft.com/default.aspx?scid=kb;EN-US;937095>
    >
    > Mike
    >
    > On 10/18/07 9:57 AM, in article
    > ,


    Thanx!
    I will try that when i get access to production server again.
    We are currently deploying the Global.asax file each time we deploy,
    will try to remove that from our build server, the code is in
    global.asax.vb anyway so that should be fine.
     
    , Oct 19, 2007
    #3
  4. Guest

    On 18 Okt, 16:09, Mike <> wrote:
    > On your production server, if you've got a file named
    > 'PreCompiledApp.config, delete it.
    >
    > There's a KB article re this issue at
    > <http://support.microsoft.com/default.aspx?scid=kb;EN-US;937095>
    >
    > Mike
    >


    Firstly we didnt have the PreCompiledApp.config file on our server.
    Tried removing Global.asax from the deploy, but still the
    application_start doesnt fire.
    Anyone else have ideas about why this happens?
     
    , Oct 19, 2007
    #4
  5. re:
    !> Anyone else have ideas about why this happens?

    Did you try what I suggested ?




    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en espaƱol : http://asp.net.do/foros/
    ======================================
    <> wrote in message news:...
    > On 18 Okt, 16:09, Mike <> wrote:
    >> On your production server, if you've got a file named
    >> 'PreCompiledApp.config, delete it.
    >>
    >> There's a KB article re this issue at
    >> <http://support.microsoft.com/default.aspx?scid=kb;EN-US;937095>
    >>
    >> Mike
    >>

    >
    > Firstly we didnt have the PreCompiledApp.config file on our server.
    > Tried removing Global.asax from the deploy, but still the
    > application_start doesnt fire.
    > Anyone else have ideas about why this happens?
    >
     
    Juan T. Llibre, Oct 19, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Max
    Replies:
    5
    Views:
    21,163
    liliancho
    Dec 7, 2011
  2. =?Utf-8?B?YmNoYXJsZXM=?=

    global.asax and global.asax.cs

    =?Utf-8?B?YmNoYXJsZXM=?=, Oct 4, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    913
    =?Utf-8?B?YmNoYXJsZXM=?=
    Oct 5, 2004
  3. Mark Rae

    Global.asax / Global.asax.cs in v2

    Mark Rae, May 23, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    3,210
    Mark Rae
    May 23, 2006
  4. Christian Blackburn
    Replies:
    7
    Views:
    1,016
    Mark Rae
    Jun 16, 2006
  5. Replies:
    1
    Views:
    1,864
    Juan T. Llibre
    Oct 18, 2007
Loading...

Share This Page