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. General Programming
  3. C#
  4. Persistent object in ASP.NET server memory

Persistent object in ASP.NET server memory

Scheduled Pinned Locked Moved C#
csharpasp-netsysadminperformancequestion
6 Posts 2 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.
  • D Offline
    D Offline
    Den2Fly
    wrote on last edited by
    #1

    Hi friends, Its a while I am looking for a way to keep some object in ASP.NET server memory permanently without loosing it at Application_End event, Is there any way? - Mohammad --- "Art happens when you least expect it."

    C 1 Reply Last reply
    0
    • D Den2Fly

      Hi friends, Its a while I am looking for a way to keep some object in ASP.NET server memory permanently without loosing it at Application_End event, Is there any way? - Mohammad --- "Art happens when you least expect it."

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Write it to a persistent store in application_end, read it in application_start. Christian Graus - Microsoft MVP - C++

      D 1 Reply Last reply
      0
      • C Christian Graus

        Write it to a persistent store in application_end, read it in application_start. Christian Graus - Microsoft MVP - C++

        D Offline
        D Offline
        Den2Fly
        wrote on last edited by
        #3

        Its an interesting idea, but note that in my situation it is not a value type or a composite of value types, its an object that is doing something in its lifetime, and I want to keep it alive. --- "Art happens when you least expect it."

        C 1 Reply Last reply
        0
        • D Den2Fly

          Its an interesting idea, but note that in my situation it is not a value type or a composite of value types, its an object that is doing something in its lifetime, and I want to keep it alive. --- "Art happens when you least expect it."

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          In that case, write it as a windows service ( the process that does this work ) Christian Graus - Microsoft MVP - C++

          D 1 Reply Last reply
          0
          • C Christian Graus

            In that case, write it as a windows service ( the process that does this work ) Christian Graus - Microsoft MVP - C++

            D Offline
            D Offline
            Den2Fly
            wrote on last edited by
            #5

            Thanks for your note; So it seems there is no way to do it without windows services? yes? By the way it is not possible to create a windows service in a web application on the fly, isn't it ? --- "Art happens when you least expect it."

            C 1 Reply Last reply
            0
            • D Den2Fly

              Thanks for your note; So it seems there is no way to do it without windows services? yes? By the way it is not possible to create a windows service in a web application on the fly, isn't it ? --- "Art happens when you least expect it."

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              Den2Fly wrote:

              So it seems there is no way to do it without windows services? yes?

              I doubt it. App end means what it says, your app is stopping.

              Den2Fly wrote:

              By the way it is not possible to create a windows service in a web application on the fly, isn't it ?

              Do you mean start one running, or create one ? You can control one. You could just run any old process, the point of a service is that you can control it from your app. Christian Graus - Microsoft MVP - C++

              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