Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. about application end event

about application end event

Scheduled Pinned Locked Moved ASP.NET
sysadminquestion
8 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rama charan
    wrote on last edited by
    #1

    hi all, I want to upgrade the applicaton code running on live server.So how can i gracefully stop my application without losing any user transactions . And i see that application end event,session close events is not guaranteed to be fired when i change application code .so clean up of pending client transactions is not a perfect manner.So can anyone suggest me how it can be done. any suggestions or links are welcome.. thanks in advance

    Rama Charan Prasad "Be happy and Keep smiling.Thats what u want be always..:)"

    G 1 Reply Last reply
    0
    • R rama charan

      hi all, I want to upgrade the applicaton code running on live server.So how can i gracefully stop my application without losing any user transactions . And i see that application end event,session close events is not guaranteed to be fired when i change application code .so clean up of pending client transactions is not a perfect manner.So can anyone suggest me how it can be done. any suggestions or links are welcome.. thanks in advance

      Rama Charan Prasad "Be happy and Keep smiling.Thats what u want be always..:)"

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      Upgrading the application doesn't require the application to be restarted. Unless you update the application critical files global.asax or web.config, the application will just contine running with the new files. The dll files in the bin folder are copied to a temporary folder before they are executed, so you can update the contents of the bin folder without having to bother about locked files.

      --- single minded; short sighted; long gone;

      R B 2 Replies Last reply
      0
      • G Guffa

        Upgrading the application doesn't require the application to be restarted. Unless you update the application critical files global.asax or web.config, the application will just contine running with the new files. The dll files in the bin folder are copied to a temporary folder before they are executed, so you can update the contents of the bin folder without having to bother about locked files.

        --- single minded; short sighted; long gone;

        R Offline
        R Offline
        rama charan
        wrote on last edited by
        #3

        hi .. thanks for your response...but i plan to update the global.asax and web.config also..in such a case do you suggest any ways to shut down the application smoothly.. something like the "session end" event are fired for currently logged on users and application end also fires properly...so that no loss of data occurs in the application processing. so that we can write some code in "application end event" to smoothly shut down critical tasks, clean up properly and restart the application.

        Rama Charan Prasad "Be happy and Keep smiling.Thats what u want be always..:)"

        G 1 Reply Last reply
        0
        • G Guffa

          Upgrading the application doesn't require the application to be restarted. Unless you update the application critical files global.asax or web.config, the application will just contine running with the new files. The dll files in the bin folder are copied to a temporary folder before they are executed, so you can update the contents of the bin folder without having to bother about locked files.

          --- single minded; short sighted; long gone;

          B Offline
          B Offline
          Blumen
          wrote on last edited by
          #4

          Hi,

          Guffa wrote:

          The dll files in the bin folder are copied to a temporary folder before they are executed, so you can update the contents of the bin folder without having to bother about locked files.

          I agree that dlls are copied to a temporary folder before the application is executed, but when my ASP.NET application is running (I'm logged in), if I changed the dlls in the bin folder, the session expires and I have to re-login. So are the dlls not locked here? Regards, blumen

          1 Reply Last reply
          0
          • R rama charan

            hi .. thanks for your response...but i plan to update the global.asax and web.config also..in such a case do you suggest any ways to shut down the application smoothly.. something like the "session end" event are fired for currently logged on users and application end also fires properly...so that no loss of data occurs in the application processing. so that we can write some code in "application end event" to smoothly shut down critical tasks, clean up properly and restart the application.

            Rama Charan Prasad "Be happy and Keep smiling.Thats what u want be always..:)"

            G Offline
            G Offline
            Guffa
            wrote on last edited by
            #5

            As far as I know, if you update global.asax or web.config, the application will end gracefully, calling Session_End for all active sessions and then Application_End. The requests currently being processed are finished before the application is restarted.

            --- single minded; short sighted; long gone;

            R 1 Reply Last reply
            0
            • G Guffa

              As far as I know, if you update global.asax or web.config, the application will end gracefully, calling Session_End for all active sessions and then Application_End. The requests currently being processed are finished before the application is restarted.

              --- single minded; short sighted; long gone;

              R Offline
              R Offline
              rama charan
              wrote on last edited by
              #6

              thks for taking time to help ya if for all active session the event "session end" is called then thts somewhat a better case (if is really happenening !!! i checked that and it dint happen once ..may be i will check that again ) and what about pages currently under execution how can i complete them if they are in the middle of execution. Is there any way that i can stop opening up new sessions and wait till current sessions which are active end ? is it possible i mean something like in databases or unix i mean !!! any suggestions or opinions or links are welcome.. thnks for trying

              Rama Charan Prasad "Be happy and Keep smiling.Thats what u want be always..:)"

              G 1 Reply Last reply
              0
              • R rama charan

                thks for taking time to help ya if for all active session the event "session end" is called then thts somewhat a better case (if is really happenening !!! i checked that and it dint happen once ..may be i will check that again ) and what about pages currently under execution how can i complete them if they are in the middle of execution. Is there any way that i can stop opening up new sessions and wait till current sessions which are active end ? is it possible i mean something like in databases or unix i mean !!! any suggestions or opinions or links are welcome.. thnks for trying

                Rama Charan Prasad "Be happy and Keep smiling.Thats what u want be always..:)"

                G Offline
                G Offline
                Guffa
                wrote on last edited by
                #7

                rama charan wrote:

                ya if for all active session the event "session end" is called then thts somewhat a better case (if is really happenening !!! i checked that and it dint happen once ..may be i will check that again )

                Note that you have to store something in the session object for the session object to be retained. The Session_End event only executes on session objects that are actually stored. Remember also that the Session_End and Application_End events are executed using a different account than regular pages, and that there is no Response object available. (You probably know this already, but just to be sure.)

                rama charan wrote:

                and what about pages currently under execution how can i complete them if they are in the middle of execution.

                I believe that the requests currently under execution will complete before the application is recycled.

                rama charan wrote:

                Is there any way that i can stop opening up new sessions and wait till current sessions which are active end ?

                I think that's how it works. Otherwise it would have to start another instance of the application while the old instance is still running. At the moment I don't have any article stating the facts, though.

                --- single minded; short sighted; long gone;

                R 1 Reply Last reply
                0
                • G Guffa

                  rama charan wrote:

                  ya if for all active session the event "session end" is called then thts somewhat a better case (if is really happenening !!! i checked that and it dint happen once ..may be i will check that again )

                  Note that you have to store something in the session object for the session object to be retained. The Session_End event only executes on session objects that are actually stored. Remember also that the Session_End and Application_End events are executed using a different account than regular pages, and that there is no Response object available. (You probably know this already, but just to be sure.)

                  rama charan wrote:

                  and what about pages currently under execution how can i complete them if they are in the middle of execution.

                  I believe that the requests currently under execution will complete before the application is recycled.

                  rama charan wrote:

                  Is there any way that i can stop opening up new sessions and wait till current sessions which are active end ?

                  I think that's how it works. Otherwise it would have to start another instance of the application while the old instance is still running. At the moment I don't have any article stating the facts, though.

                  --- single minded; short sighted; long gone;

                  R Offline
                  R Offline
                  rama charan
                  wrote on last edited by
                  #8

                  hi Guffa.. thanks for being so helpful.. i have tried to observe some time ago( dint check it now again) to put some important code in application end and session end events. but when i was replacing with new application code the sessions were not ended some times properly and application end event (i think..) also did not happen to fire...which may cause my application to face serious issues if users are logged on .... any way i will check the events again and get back to you till then ... thaaaaaaank you very much and keep trying...

                  Rama Charan Prasad "Be happy and Keep smiling.Thats what u want be always..:)"

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups