Application_Start (global.asax) not firing on Windows 2003 Server

Last post 12-21-2007 5:41 AM by fix105. 11 replies.

Sort Posts:

  • Application_Start (global.asax) not firing on Windows 2003 Server

    04-10-2006, 1:30 PM
    • Member
      112 point Member
    • Egdif
    • Member since 06-20-2002, 9:16 AM
    • Posts 39
    Hi
     
    I recently converted a project to a Web Application Project and the Application_Start event no longer fires in my global.asax.cs file on our live Windows 2003 Server. It all works fine when running under XP on my local dev machine though.
     
    I have tried adding a new global.asax using the Add->New menu option, and then copying the code over but this hasn't fixed the problem.
     
    Has anyone encountered this at all?
     
    Thanks
     
    Ben
  • Re: Application_Start (global.asax) not firing on Windows 2003 Server

    04-11-2006, 5:17 PM
    • Participant
      990 point Participant
    • Baiju
    • Member since 09-17-2002, 7:07 PM
    • Posts 198
    • AspNetTeam

    Ben,

    We have not seen problem at all. Could you please send me (baijunATmicrosoftDOTcom) a sample application showing this problem?

    Baiju

     

    "This posting is provided "AS IS" with no warranties, and confers no rights"
  • Re: Application_Start (global.asax) not firing on Windows 2003 Server

    04-12-2006, 2:57 AM
    • Member
      112 point Member
    • Egdif
    • Member since 06-20-2002, 9:16 AM
    • Posts 39

    Baiju

    I will try and sort out a cut down version of my application for you later today.

    Ben

     

  • Re: Application_Start (global.asax) not firing on Windows 2003 Server

    04-22-2006, 7:29 AM
    • Member
      5 point Member
    • dastra
    • Member since 04-22-2006, 11:27 AM
    • Posts 1
    We had a similar problem with our deployment. We were building with nant, and the issue with us was that the "Global.asax" file was not being copied across when we deployed to windows server 2003
  • Re: Application_Start (global.asax) not firing on Windows 2003 Server

    04-27-2006, 2:42 PM
    • Member
      20 point Member
    • karmamechanic
    • Member since 04-25-2006, 7:51 PM
    • Posts 4

    I'm having the same or a simlar problem.

    None of my global.asax events fire on an XP test box or the 2003 server. They fire on my development box that has VS2005.

    I've deleted and re-added global.asax and even declared a custom event handler that fires on my dev box but not the test box. I built and deployed, published and deployed, checked that the same dlls and global.asax are there, checked the inherits tag in global.asax, checked webconfig, checked ASP.NET setup tab in IIS. All to no avail.

    Any solutions yet?

  • Re: Application_Start (global.asax) not firing on Windows 2003 Server

    05-18-2006, 10:00 PM

    Changing the name of the Application_Start method to Application_OnStart fixed it for me.

     

    Cheers

  • Re: Application_Start (global.asax) not firing on Windows 2003 Server

    09-21-2006, 6:30 PM
    • Member
      25 point Member
    • ScottWhigham
    • Member since 09-02-2006, 12:08 PM
    • Dallas, TX
    • Posts 5

    Thank you! That worked.

    Jeez this sucks though. I'm helping maintain some .NEt 2.0 software using this Web Application Project and now I have to name methods differently when using this vs. standard websites in .NET 2.0? Crappy...

    ===========================
    Check out my SQL Server site - http://www.learnsqlserver.com/

    SQL Server Code Samples:
    http://forums.learnsqlserver.com/CodeSamples.aspx
    ===========================
  • Re: Application_Start (global.asax) not firing on Windows 2003 Server

    09-22-2006, 2:57 AM

     

    it really amazing to find so much of many problems and appericate people who are able to figure out the solution.

     

    Jai Ganesh. J , GSD ,India

    Please Mark As Answer If my reply helped you.
  • Re: Application_Start (global.asax) not firing on Windows 2003 Server

    04-13-2007, 11:39 AM
    • Member
      2 point Member
    • Asyncritus
    • Member since 03-29-2007, 9:18 PM
    • Posts 1

    I was having the exact same issue and was able to fix it by removing the PrecompiledApp.config file that was in the root directory of the web site on our test server.  I'm guessing that file was a holdover from when the project was a Web Site project.  I recently converted it over to a Web App project.  So if you are building a Web App project, make sure you DON'T have a PrecompiledApp.config file on your target server.

     

  • Re: Application_Start (global.asax) not firing on Windows 2003 Server

    06-27-2007, 4:49 AM

     application_start evevt  of Global.asax in asp.net 2.0 web application  is working on my  local machine on windows XP , and Visual Studio 2005 but this event is not fired on windows server 2003.

  • Re: Application_Start (global.asax) not firing on Windows 2003 Server

    10-02-2007, 10:32 AM
    • Member
      12 point Member
    • tapic
    • Member since 04-03-2006, 10:15 PM
    • Posts 11

    none of the solutions worked for me.

    What is the correct way of deploying a website having a global.asax file?

     Could it be because of the virtualpath and filedep found below in the compiled version of global.asax file?

    this paths are related to my local and not related to my deployment server. So why get these paths deployed this way?

    there is no path as: "/proj/global.asax" in deployment server. proj is the name of the local folder where I work for the project.

    <?xml version="1.0" encoding="utf-8"?>
    <preserve resultType="8" virtualPath="/proj/global.asax" hash="ffffffffe8c669c9" filehash="29d0de3dd91a" flags="150000" assembly="App_global.asax" type="ASP.global_asax">
        <filedeps>
            <filedep name="/proj/global.asax" />
        </filedeps>
    </preserve> 

    -----

    the code below yields : 
    ApplicationInstance: ASP.global_asax 
     

    protected void Page_Load(object sender, EventArgs e)
        {
            Response.Write("<br/>ApplicationInstance: " +
    Context.ApplicationInstance.GetType().FullName);
        }

     

    it should not be so hard.

  • Re: Application_Start (global.asax) not firing on Windows 2003 Server

    12-21-2007, 5:41 AM
    • Member
      9 point Member
    • fix105
    • Member since 07-24-2006, 4:00 AM
    • Liège
    • Posts 7

    Hi,

    I have exactly the same problem, using windows 2003 (Server).

    In loval -> Windows XP + Visual Studio 2005 + .NET 2.0 + Web Application with Global.asax.

    I need the global.asax to manage the error logging, but in local all is ok and not after the deployment.

    My global.asax is never called :(

    Thanks in advance for any help.

    Fix  

     

Page 1 of 1 (12 items)