473,396 Members | 2,018 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Application_End never executes

I've created a .net web service in c#.
When there is no open session i need to free some
resources.
So, I've place the code on the Global.Application_End
member.
Unffortunatly it seems that the code is never executed (at
least when i debug it).

Help anyone?
Nov 15 '05 #1
1 3092
Hi Pedro,
The application does not ends when there are no sessions actives, if you
want to trigger the application_end to trigger you could stop the IIS admin
service while running the application, this will do the trick ;)
If you want to free resources when the session number reach 0 then I would
do something more simple, just keep a counter on the application scope that
is increased in the Session_Start and decrease on the Session_End if it
reach 0 do your cleaning , now that there is no session active does not
imply a new session will no be created soon, so you have to valorate if it's
better to have them active or just freed them.
Pd:
According to MSDN a change in the global.asax should have the same effect ,
I haven't try it but maybe you should as it's a less drastic solution that
stop the IIS service.

Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Pedro Duque" <pe**********@optimus.pt> wrote in message
news:0a****************************@phx.gbl...
I've created a .net web service in c#.
When there is no open session i need to free some
resources.
So, I've place the code on the Global.Application_End
member.
Unffortunatly it seems that the code is never executed (at
least when i debug it).

Help anyone?

Nov 15 '05 #2

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

Similar topics

0
by: sushi | last post by:
Hello, When is Application_End event called? Actually, I am developing a web application which will start some operation that will continue to run even when the session of all the user's end...
3
by: Jim Owen | last post by:
My .Net book states that the Application_End event handler in Global.asax gets called typically about 20 minutes after the last HTTP request. My question is: what is the best way to debug my...
8
by: Alphonse Giambrone | last post by:
I have a small asp.net web app running on a shared host. It uses a Jet (Access) database. I included a routine to compact the database when the application_event fires if it has not been compacted...
4
by: Vlad Hrybok | last post by:
I am using Application_End to send out a notification about application being unloaded. I found that those notifications are not being sent because the app seems to get unloaded without...
4
by: J-T | last post by:
I have my applciation installed in an appplication pool (a worker process) -IIS 6.0-which is defined to be shut down after 20 minutes of being idle.If I put a breakpoint in Application_End method...
1
by: Navin Mishra | last post by:
Hi, If IIS Application Pool for a web service is called, shouldn't Application_End be called ? Some how I'm not seeing that. I've cached some client connection in Application object and I want...
0
by: Stonie | last post by:
Hi All, I have an asp.net web application that needs to clean up some worker threads on application shutdown. These threads are emptying an in memory buffer of messages to disk. Basically I...
2
by: Ido | last post by:
Hi, If asp process is being recycled/restarted gracefully, will Application_End allways be called? In addition, according to : http://www.codecomments.com/archive289-2005-2-393853.html one can...
5
by: Tenacious | last post by:
I am trying to shutdown a database server in the Application_End event handler on the Global.asax page. So far I am trying this only on the development server that comes with Visual Studio 2005....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
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,...
0
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...
0
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...
0
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...

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.