Application start and close
Is there an event for Application_load and Application_cLose?
I need this function, even if I kill the application via the IDE. Any ideas?
reason: is I have a third party server that remember logins(permission) and after so many stops letting people login.
thanks,
Dean
Re: Application start and close
is this ASP.NET or a Win Forms app?
Re: Application start and close
Re: Application start and close
no there is no global event for when a windows form app closes... if you structure it correctly, using a sub main and application.run and application.exit, you can call aditional code before the exe exits, to notify your server the app is closing.. but if the process is terminated.. it is just killed where it stands... which is what the IDE does when you press the stop button, or if you kill the process in the taskmanager..
the server should really be the thing to handle this though.. you don't mention what kind of server it is or what it does.. but as users interact with it, it should have a way to flag that their "Session" is still active, but after a session goes so long without activty, it is terminated at the server level, to open up a connection for someone else...
Re: Application start and close
Actually it is a PCMiler server, used for gathering Mileage.
It needs to be logged out or the connections stay alive.
Re: Application start and close
it doesn't have any sort of timeout built into it?
Re: Application start and close
Trying to avoid having to deal with that part.
I will check into it though.
Thanks,
Dean
Re: Application start and close
its really the ideal way... i mean what if the end user has a power outage.. no code you put in your client app will be able to tell the server that...
Re: Application start and close