469,920 Members | 2,215 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,920 developers. It's quick & easy.

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.
Nov 17 '05 #1
4 6795
Nevermind...

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

D'oH!.

"Halcyon Woodward" <ha***********@hotmail.com> wrote in message
news:OJ**************@TK2MSFTNGP12.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.

Nov 17 '05 #2
Nevermind...

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

D'oH!.

"Halcyon Woodward" <ha***********@hotmail.com> wrote in message
news:OJ**************@TK2MSFTNGP12.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.

Nov 17 '05 #3
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" <ha***********@hotmail.com>
!References: <OJ**************@TK2MSFTNGP12.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: <ek**************@TK2MSFTNGP12.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" <ha***********@hotmail.com> wrote in message
!news:OJ**************@TK2MSFTNGP12.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.
!>
!>
!
!
!
Nov 17 '05 #4
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.

Nov 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Rashad Rivera | last post: by
7 posts views Thread by Gordon Smith | last post: by
1 post views Thread by Fernando Arámburu | last post: by
5 posts views Thread by miha.valencic | last post: by
18 posts views Thread by Joey | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.