Professional Web Applications Themes

HttpApplication Init, Application_Start and Application_End don't fire - ASP.NET General

I have an odd problem... We have a small development team (three coders) working on the same project (a C# web application). Each coder has a unique 'sandbox' site on a shared Windows 2003 where they can test the code they write. The majority of the code is written into a stand-alone class library shared via VSS, that is then referenced by each sandbox web (each of which is unique to each user). In the stand-alone class library, we have a class (PortalServices.Application) that subclasses or derives from System.Web.HttpApplication for common application-level event trapping.. In each sandbox web, the backend ...

  1. #1

    Default HttpApplication Init, Application_Start and Application_End don't fire

    I have an odd problem...

    We have a small development team (three coders) working on the same project
    (a C# web application). Each coder has a unique 'sandbox' site on a shared
    Windows 2003 where they can test the code they write. The majority of the
    code is written into a stand-alone class library shared via VSS, that is
    then referenced by each sandbox web (each of which is unique to each user).

    In the stand-alone class library, we have a class
    (PortalServices.Application) that subclasses or derives from
    System.Web.HttpApplication for common application-level event trapping.. In
    each sandbox web, the backend code for Global.asax is altered to derive from
    this custom class instead of HttpApplication. There are methods that
    override Init, and then the standard protected event handler methods.

    The first coder that we set up in this envrionment worked exactly as
    planned. However, the second coder has experienced a very odd problem. The
    Application_Start method fires once - when the web project is first created
    on the Windows 2003 server, after that - even if the server is rebooted -
    the Application_Start method never gets called again, and the Init and
    Application_End methods are _never_ called.

    It's driving us crazy. We need to have our sandbox sites on a Windows 2003
    server to test specific functionality that is unique to 2003, but we don't
    relish installing 2003 on each of our desktops as our workstation platform.

    Anybody have any ideas? Thanks in advance,

    hb.


    Halcyon Woodward Guest

  2. #2

    Default Re: HttpApplication Init, Application_Start and Application_End don't fire

    Nevermind...

    The issue was related to security problems with the log we were writing to.

    D'oH!.



    "Halcyon Woodward" <halcyondaze73hotmail.com> wrote in message
    news:OJUr7iiSDHA.2148TK2MSFTNGP12.phx.gbl...
    > I have an odd problem...
    >
    > We have a small development team (three coders) working on the same
    project
    > (a C# web application). Each coder has a unique 'sandbox' site on a
    shared
    > Windows 2003 where they can test the code they write. The majority of the
    > code is written into a stand-alone class library shared via VSS, that is
    > then referenced by each sandbox web (each of which is unique to each
    user).
    >
    > In the stand-alone class library, we have a class
    > (PortalServices.Application) that subclasses or derives from
    > System.Web.HttpApplication for common application-level event trapping..
    In
    > each sandbox web, the backend code for Global.asax is altered to derive
    from
    > this custom class instead of HttpApplication. There are methods that
    > override Init, and then the standard protected event handler methods.
    >
    > The first coder that we set up in this envrionment worked exactly as
    > planned. However, the second coder has experienced a very odd problem.
    The
    > Application_Start method fires once - when the web project is first
    created
    > on the Windows 2003 server, after that - even if the server is rebooted -
    > the Application_Start method never gets called again, and the Init and
    > Application_End methods are _never_ called.
    >
    > It's driving us crazy. We need to have our sandbox sites on a Windows
    2003
    > server to test specific functionality that is unique to 2003, but we don't
    > relish installing 2003 on each of our desktops as our workstation
    platform.
    >
    > Anybody have any ideas? Thanks in advance,
    >
    > hb.
    >
    >

    Halcyon Woodward Guest

  3. #3

    Default Re: HttpApplication Init, Application_Start and Application_End don't fire

    Hello Halcyon,

    If you have time, could you please post more details on the solution of the problem and how you found it in order that all the
    community could benefit from it? Thanks very much for participating Microsoft newsgroup.

    Best regards,
    Yanhong Huang
    Microsoft Online Partner Support

    Get Secure! - [url]www.microsoft.com/security[/url]
    This posting is provided "AS IS" with no warranties, and confers no rights.

    --------------------
    !From: "Halcyon Woodward" <halcyondaze73hotmail.com>
    !References: <OJUr7iiSDHA.2148TK2MSFTNGP12.phx.gbl>
    !Subject: Re: HttpApplication Init, Application_Start and Application_End don't fire
    !Date: Mon, 14 Jul 2003 14:22:35 -0700
    !Lines: 52
    !X-Priority: 3
    !X-MSMail-Priority: Normal
    !X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    !X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    !Message-ID: <ek1nN4kSDHA.1948TK2MSFTNGP12.phx.gbl>
    !Newsgroups: microsoft.public.dotnet.framework.aspnet
    !NNTP-Posting-Host: nausers.mccann.com 199.4.18.2
    !Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
    !Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:159050
    !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    !
    !Nevermind...
    !
    !The issue was related to security problems with the log we were writing to.
    !
    !D'oH!.
    !
    !
    !
    !"Halcyon Woodward" <halcyondaze73hotmail.com> wrote in message
    !news:OJUr7iiSDHA.2148TK2MSFTNGP12.phx.gbl...
    !> I have an odd problem...
    !>
    !> We have a small development team (three coders) working on the same
    !project
    !> (a C# web application). Each coder has a unique 'sandbox' site on a
    !shared
    !> Windows 2003 where they can test the code they write. The majority of the
    !> code is written into a stand-alone class library shared via VSS, that is
    !> then referenced by each sandbox web (each of which is unique to each
    !user).
    !>
    !> In the stand-alone class library, we have a class
    !> (PortalServices.Application) that subclasses or derives from
    !> System.Web.HttpApplication for common application-level event trapping..
    !In
    !> each sandbox web, the backend code for Global.asax is altered to derive
    !from
    !> this custom class instead of HttpApplication. There are methods that
    !> override Init, and then the standard protected event handler methods.
    !>
    !> The first coder that we set up in this envrionment worked exactly as
    !> planned. However, the second coder has experienced a very odd problem.
    !The
    !> Application_Start method fires once - when the web project is first
    !created
    !> on the Windows 2003 server, after that - even if the server is rebooted -
    !> the Application_Start method never gets called again, and the Init and
    !> Application_End methods are _never_ called.
    !>
    !> It's driving us crazy. We need to have our sandbox sites on a Windows
    !2003
    !> server to test specific functionality that is unique to 2003, but we don't
    !> relish installing 2003 on each of our desktops as our workstation
    !platform.
    !>
    !> Anybody have any ideas? Thanks in advance,
    !>
    !> hb.
    !>
    !>
    !
    !
    !


    Yan-Hong Huang[MSFT] Guest

  4. #4

    Default Re: HttpApplication Init, Application_Start and Application_End don't fire

    The problem turned out to be unrelated to the symptoms, as is often the case
    with most stumpers I've come across.

    We had a method in the Application class that would write entries to an XML
    log file, which we were using to record when each event fired. The same
    method was called to record whenever the Application_Error event fired.

    To make a long story short, we were having security problems with the
    logging method, the executing thread didn't always have permission to write
    to the XML file. Because the logging method was always called first in each
    event handling method, including Application_Error, no indication that an
    exception had been thrown ever bubbled up; producing the symptoms I
    described in my post.

    Cheers,

    hb.



    Halcyon Woodward Guest

Similar Threads

  1. how to throw SoapException from HttpApplication
    By Ajay Choudhary in forum ASP.NET Web Services
    Replies: 0
    Last Post: May 23rd, 08:54 PM
  2. Application_Start event does not fire on restart of IIS?
    By Morten Overgaard in forum ASP.NET
    Replies: 1
    Last Post: August 26th, 06:30 AM
  3. Application_End
    By noname in forum ASP.NET General
    Replies: 0
    Last Post: July 16th, 06:46 PM
  4. httpapplication in ASP.NET modules problem
    By Paul in forum ASP.NET General
    Replies: 0
    Last Post: July 11th, 11:05 PM
  5. Global.asax Application_End questions
    By Jim Owen in forum ASP.NET General
    Replies: 3
    Last Post: July 3rd, 09:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139