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

  • Question

  • User264112824 posted
    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
    Monday, April 10, 2006 1:30 PM

All replies

  • User308589185 posted

    Ben,

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

    Baiju

     

    Tuesday, April 11, 2006 5:17 PM
  • User264112824 posted

    Baiju

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

    Ben

     

    Wednesday, April 12, 2006 2:57 AM
  • User-268440829 posted
    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
    Saturday, April 22, 2006 7:29 AM
  • User-850825055 posted

    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?

    Thursday, April 27, 2006 2:42 PM
  • User1656450269 posted

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

     

    Cheers

    Thursday, May 18, 2006 10:00 PM
  • User-699729574 posted

    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...

    Thursday, September 21, 2006 6:30 PM
  • User-1773948845 posted

     

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

     

    Friday, September 22, 2006 2:57 AM
  • User519195063 posted

    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.

     

    Friday, April 13, 2007 11:39 AM
  • User163303696 posted

     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.

    Wednesday, June 27, 2007 4:49 AM
  • User925579289 posted

    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.

    Tuesday, October 2, 2007 10:32 AM
  • User623661498 posted

    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  

     

    Friday, December 21, 2007 5:41 AM