HttpApplication Init, Application_Start and Application_End don't fire

H

Halcyon Woodward

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

Halcyon Woodward

Nevermind...

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

D'oH!.
 
Y

Yan-Hong Huang[MSFT]

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! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!From: "Halcyon Woodward" <[email protected]>
!References: <[email protected]>
!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: <[email protected]>
!Newsgroups: microsoft.public.dotnet.framework.aspnet
!NNTP-Posting-Host: nausers.mccann.com 199.4.18.2
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.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!.
!
!
!
!!> 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.
!>
!>
!
!
!
 
H

Halcyon Woodward

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.
 

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

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top