473,554 Members | 4,738 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application_Sta rt not firing in global.asax

Max
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_Sta rt just isn't
firing today. Is there some configuration that prevents this from happening?

I've never gotten Session_End to fire either.

-M
Nov 17 '05 #1
4 11940
Well I don't know when "you'd expect" the Application_Sta rt event to fire,
but I know I don't expect it to happen very often. Under normal release
conditions it should normally pretty much only fire after you reboot the
server and someone requests the first page.
The session will time out after 20 minutes of no page requests from the
user.
This default time interval is configurable in your web.config file.
After the session times out the Session_End event will be called in your
Global.asax file.
You can terminate the session manually by calling Session.Abandon , but be
aware this will cause the Session_End event to not be called. But that's
not so bad. Just take your code from the Session_End event, put it in a
separate function, then call that function from both your Session_End event
and whenever you call Session.Abandon . The Session_End event also won't
fire when you hit the stop button in the VS.NET IDE. It also won't fire at
all if you're not using standard in proc sessions.

Here's more details for you:
http://www.asp.net/Forums/ShowPost.a...=1&PostID=7504

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"Max" <ma*****@portvi sta.com> wrote in message
news:R0******** ************@tw ister.tampabay. rr.com...
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_Sta rt just isn't firing today. Is there some configuration that prevents this from happening?
I've never gotten Session_End to fire either.

-M

Nov 17 '05 #2
Max
I understand all that very well as I've been working on this problem for 3
months now. I've never been able to get Session_End to fire neither on the
remote server or my local machine. But just recently I've noticed nothing in
the global.asax is firing on my local machine and cookieless mode does not
work either. I suspect the cookie problem has to do with my application not
being in the root of my IIS, as it works fine on the remote.

Any direction you could point me too would be helpful.

-M

"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
news:ei******** ******@TK2MSFTN GP10.phx.gbl...
Well I don't know when "you'd expect" the Application_Sta rt event to fire,
but I know I don't expect it to happen very often. Under normal release
conditions it should normally pretty much only fire after you reboot the
server and someone requests the first page.
The session will time out after 20 minutes of no page requests from the
user.

Nov 17 '05 #3
Congratulations on those shiney new letters in your name. It is well
deserved. Keep up the good work.

"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
news:ei******** ******@TK2MSFTN GP10.phx.gbl...
Well I don't know when "you'd expect" the Application_Sta rt event to fire,
but I know I don't expect it to happen very often. Under normal release
conditions it should normally pretty much only fire after you reboot the
server and someone requests the first page.
The session will time out after 20 minutes of no page requests from the
user.
This default time interval is configurable in your web.config file.
After the session times out the Session_End event will be called in your
Global.asax file.
You can terminate the session manually by calling Session.Abandon , but be
aware this will cause the Session_End event to not be called. But that's
not so bad. Just take your code from the Session_End event, put it in a
separate function, then call that function from both your Session_End event and whenever you call Session.Abandon . The Session_End event also won't
fire when you hit the stop button in the VS.NET IDE. It also won't fire at all if you're not using standard in proc sessions.

Here's more details for you:
http://www.asp.net/Forums/ShowPost.a...=1&PostID=7504

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"Max" <ma*****@portvi sta.com> wrote in message
news:R0******** ************@tw ister.tampabay. rr.com...
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_Sta rt just

isn't
firing today. Is there some configuration that prevents this from

happening?

I've never gotten Session_End to fire either.

-M


Nov 17 '05 #4
Max
Ok, I found my solution. All subs now work on my global.asax FINALLY !!!!

I simply renamed the global.asax file and added a new one to the project. It
now runs fine.

Now since I don't believe in VS.NET's MYSTERY CODE, I decided to compare the
old global files with the new global files to see what the problem was, but
found them to be completely identical! Have any explanation for that Mr. MVP
?? LOL!

Seriously, I would like to know how the global.asax screws up like this...
it seems like a very common problem. Deleting and adding a new gloabal.asax
is not in any of the articles I've read. It must just not compile for some
reason. resx was all in there...

-M
"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
news:ei******** ******@TK2MSFTN GP10.phx.gbl...
Well I don't know when "you'd expect" the Application_Sta rt event to fire,
but I know I don't expect it to happen very often. Under normal release
conditions it should normally pretty much only fire after you reboot the
server and someone requests the first page.
The session will time out after 20 minutes of no page requests from the
user.
...

Here's more details for you:
http://www.asp.net/Forums/ShowPost.a...=1&PostID=7504

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

Nov 17 '05 #5

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

Similar topics

2
2386
by: barak | last post by:
Hi. I noticed that when I change the timeout of the session in web.config, the event application_start in global.asax is raise, although I make no compilation. is it normal? is there a way to change the session timeout without firing the application_start event> thanks Barak
2
1745
by: paulo | last post by:
I have an asp.net app on 3 webservers (all same platform). The apps make extensive use of Application variables. A problem is occuring on 1 app - I have itentified that application variables are not been loaded on Application_Start. For example: in global.asax: protected void Application_Start(Object sender, EventArgs e) { Application =...
0
2095
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...
4
6345
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;
6
5850
by: Saar Carmi | last post by:
Hi How can I get the application's virtual directory from the Application_Start method in Global.asax ? Keep in mind there is no request/response object available yet in this stage. Thanks Saar.
4
2131
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...
6
2216
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...
0
1077
by: Ben Fidge | last post by:
Hi I recently converted a project to a Web Application Project and the Application_Start event no longer fires in my global.asax.cs file on our live Windows 2003 Server. It all works fine when running under XP on my local dev machine though. I have tried adding a new global.asax using the Add->New menu option, and then copying the code...
7
2257
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....
0
7819
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. ...
0
8055
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...
1
7581
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6170
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...
1
5446
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...
0
3589
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...
0
3566
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1149
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
858
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...

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.