473,856 Members | 1,559 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HttpApplication Init, Application_Sta rt 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.Http Application 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_Sta rt 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_Sta rt 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 7095
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******** ******@TK2MSFTN GP12.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.Http Application 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_Sta rt 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_Sta rt 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******** ******@TK2MSFTN GP12.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.Http Application 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_Sta rt 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_Sta rt 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_Sta rt 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.publi c.dotnet.framew ork.aspnet
!NNTP-Posting-Host: nausers.mccann. com 199.4.18.2
!Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP12.phx.g bl
!Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:1590 50
!X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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******* *******@TK2MSFT NGP12.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.Http Application 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_Sta rt 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_Sta rt 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_Err or 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_Err or, 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
7817
by: alexB | last post by:
On my ASP.NET application, restarting the application through IIS doesn't always fire the Application_Start() event. Is there a trick to this? Restarting IIS is not an option since there are other applications on the machine.
0
476
by: Halcyon Woodward | last post by:
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...
7
1769
by: [Gauthier] | last post by:
Hello, I've a simple question: On a server that run multiple asp.net HttpApplication, is there any way with the asp.net framework to exchange data between different application? I basically need to send message to a 'server wide' application from any HttpApplication on the same server and obtain responses (wich may be simple strings or streams for example), this 'server wide' application is also
5
2834
by: Rashad Rivera | last post by:
I need to know why the Application_Start function fires twice when it initializes. It is doing double work and messing up my process. Thanks for your help - Rashad
7
2471
by: Gordon Smith | last post by:
I have four (4) ASP.NET Web applications/Web sites on a IIS/6 - Windows Server 2003 production server. 3 of them work fine. I just installed the 4th one and it's Application_Start event is not firing. I have double-checked everything (and rechecked) and I haven't found anything that would explain why the Application is not starting. Here is what I have done so far to troubleshoot this: In IIS Manager I have ensured that there is a...
1
2241
by: Fernando Arámburu | last post by:
Hy everybody, I´m working on an ASP.NET framework and and I need to extend System.Web.HttpApplication. I mean, I need to put some intermediate class between System.Web.HttpApplication and Global class on Global.asax file. What I need, in code, is the following: public class MyhttpApplication : System.Web.HttpApplication and then , Global class extends myHttpApplication
4
6377
by: Marc Missire | last post by:
Hi, I have an issue below I'd love help with, involving a static variable, Application_Start, and a background thread. In global.asax.cs I have a static variable (outside any method) with a default value, such as: private static string serverName = string.Empty;
5
1547
by: miha.valencic | last post by:
Hi! A while ago, I noticed that there are usually two instances of HttpApplication created within IIS (observed on WinXPPro). Why is that? Especially, since Application_Start handler is called on only one instance (the one that was created first). Anyone has an idea? How to test:
18
2158
by: Joey | last post by:
asp.net 2/C# I have noticed that during periods of inactivity on my website, the Application_Start event is firing about every 40-45 minutes. Is this normal? Shouldn't the app start once and remain running until I stop it? JP
0
9762
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10696
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10384
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9531
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7932
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7094
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5958
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4174
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3201
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.