473,657 Members | 2,423 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application_Sta rt in Global.asax doesnt fire!

Hi!

I have some code within the Application_Sta rt event in Global.asax
that runs a sqlscript against my sql server to check the databas
version. My problem is that sometimes the Application_Sta rt event
doesnt fire, it skips it and goes directly to my default.aspx file.

I do the following:

1. IISReset.
2. Deploy application files.
3. Start http://localhost/default.aspx

Sometimes the Application_Sta rt is fired, other times it doesnt. I
have seen that this more often do happen in my production environment
(IIS 6.0, Windows Server 2003) than on my developer machine.

Any ideas?

Mcad

Oct 18 '07 #1
4 6144
On your production server, if you've got a file named
'PreCompiledApp .config, delete it.

There's a KB article re this issue at
<http://support.microso ft.com/default.aspx?sc id=kb;EN-US;937095>

Mike
On 10/18/07 9:57 AM, in article
11************* *********@k35g2 00...legr oups.com,
"ga*********@ho tmail.com" <ga*********@ho tmail.comwrote:
Hi!

I have some code within the Application_Sta rt event in Global.asax
that runs a sqlscript against my sql server to check the databas
version. My problem is that sometimes the Application_Sta rt event
doesnt fire, it skips it and goes directly to my default.aspx file.

I do the following:

1. IISReset.
2. Deploy application files.
3. Start http://localhost/default.aspx

Sometimes the Application_Sta rt is fired, other times it doesnt. I
have seen that this more often do happen in my production environment
(IIS 6.0, Windows Server 2003) than on my developer machine.

Any ideas?

Mcad
Oct 18 '07 #2
On 18 Okt, 16:09, Mike <Micha...@commu nity.nospamwrot e:
On your production server, if you've got a file named
'PreCompiledApp .config, delete it.

There's a KB article re this issue at
<http://support.microso ft.com/default.aspx?sc id=kb;EN-US;937095>

Mike

On 10/18/07 9:57 AM, in article
1192715829.4105 94.106...@k35g2 000prh.googlegr oups.com,
Thanx!
I will try that when i get access to production server again.
We are currently deploying the Global.asax file each time we deploy,
will try to remove that from our build server, the code is in
global.asax.vb anyway so that should be fine.
Oct 19 '07 #3
On 18 Okt, 16:09, Mike <Micha...@commu nity.nospamwrot e:
On your production server, if you've got a file named
'PreCompiledApp .config, delete it.

There's a KB article re this issue at
<http://support.microso ft.com/default.aspx?sc id=kb;EN-US;937095>

Mike
Firstly we didnt have the PreCompiledApp. config file on our server.
Tried removing Global.asax from the deploy, but still the
application_sta rt doesnt fire.
Anyone else have ideas about why this happens?

Oct 19 '07 #4
re:
!Anyone else have ideas about why this happens?

Did you try what I suggested ?


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== ========
<ga*********@ho tmail.comwrote in message news:11******** *************@q 3g2000prf.googl egroups.com...
On 18 Okt, 16:09, Mike <Micha...@commu nity.nospamwrot e:
>On your production server, if you've got a file named
'PreCompiledAp p.config, delete it.

There's a KB article re this issue at
<http://support.microso ft.com/default.aspx?sc id=kb;EN-US;937095>

Mike

Firstly we didnt have the PreCompiledApp. config file on our server.
Tried removing Global.asax from the deploy, but still the
application_sta rt doesnt fire.
Anyone else have ideas about why this happens?

Oct 19 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7067
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...
4
11953
by: Max | last post by:
I've noticed some procedures don't run in the global.asax when you'd expect them to. I've rebuilt and set break points, but Application_Start just isn't firing today. Is there some configuration that prevents this from happening? I've never gotten Session_End to fire either. -M
0
2106
by: SeanGallavan | last post by:
Our Environment: Two network load balanced (using Microsoft NLB software) webservers with session maintained in a SQL Server database. NLB is configured with no affinity settings and two network cards in each machine. Machine keys are identical on both webservers. There is no anti-virus software installed. SQL Server database is storing session information as specified by Microsoft guidelines.
4
6355
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;
4
2134
by: NoNickname | last post by:
Hi, I need to get a string from a COM component at application start. (It's a Long Story and I cannot change this fact.) In ASP.NET 1.1, I simply called this COM component in Global.asax.cs from Application_Start, stuck the string in the HttpApplication.Application object and life was good. However, I've noticed in ASP.NET 2.0 you are not given the opportunity to create a .cs codebehind file for the Global.asax when you go to ADD NEW...
6
2221
by: Joe Befumo | last post by:
I just created the default personal site project in Visual Studio 2005, and it worked perfectly -- very nice. Next, I'd like to import some stat-capture code that I have working in a Visual Studio 2003 asp,net project. The first think I noticed is that in the 2003 project, there's a global.asax and a global.asax.vb file, with the code being in the latter. Since the 2005 project had a routine directly in the global.asax file, I moved it to...
1
1661
by: Steve | last post by:
Looking for some help on this one... I have three servers (development, staging, production), each running the same code. All three computers are running Windows 2003 Server, IIS 6.0. I have some code in the GLOBAL.ASAX file, which writes out a message to a database indicating that the event fired. When running on the development or staging servers, I can make this
7
2264
by: Christian Blackburn | last post by:
Hi Gang, Let me start by saying I'm using Visual Web Developer 2005 and ASP.net 2.0. Is there something I have to do to get my Global.asax fire when my application loads. If I set a breakpoint nothing happens also I can tell that it's not updating my database. I'm storing the users's session ID in the database to prevent multiple logins. However, when their session expires it's not clearning their record. Are there prohibitive...
0
1244
by: gamesforums | last post by:
Hi! I have some code within the Application_Start event in Global.asax that runs a sqlscript against my sql server to check the databasversion. My problem is that sometimes the Application_Start event doesnt fire, it skips it and goes directly to my default.aspx file. I do the following: 1. IISReset. 2. Deploy application files. 3. Start http://localhost/default.aspx
0
8394
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8306
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
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7327
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
6164
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
5632
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
4152
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1615
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.