Shared Global variable

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • coderr

    Shared Global variable

    hi folks,
    i have a simple question, I need a mechanism like Application State, a
    global variable in the memory which is shared by all clients and also
    i want to access it from a different PROCESS on the same server??

    Another question: Is there a memory location (or a live object)
    accessible from all websites on a single machine (global to ISS)??

    i can solve above problems by using disk files(IO) as shared resources
    or .NET Remoting etc. but i wonder if there a simple built-in
    mechanism

    thanks in advance
  • bruce barker

    #2
    Re: Shared Global variable

    the .net vm does not support this. you should use remoting or a
    database. you can p/invoke and a nt shared library to do this in memory
    only.

    -- bruce (sqlwork.com)

    coderr wrote:
    hi folks,
    i have a simple question, I need a mechanism like Application State, a
    global variable in the memory which is shared by all clients and also
    i want to access it from a different PROCESS on the same server??
    >
    Another question: Is there a memory location (or a live object)
    accessible from all websites on a single machine (global to ISS)??
    >
    i can solve above problems by using disk files(IO) as shared resources
    or .NET Remoting etc. but i wonder if there a simple built-in
    mechanism
    >
    thanks in advance

    Comment

    • =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=

      #3
      RE: Shared Global variable

      To "share" objects between processes, you will need to use MemoryMappedFil es
      or NamedPipes.
      -- Peter
      Site: http://www.eggheadcafe.com
      UnBlog: htp://petesbloggerama .blogspot.com
      Short Urls & more: http://ittyurl.net


      "coderr" wrote:
      hi folks,
      i have a simple question, I need a mechanism like Application State, a
      global variable in the memory which is shared by all clients and also
      i want to access it from a different PROCESS on the same server??
      >
      Another question: Is there a memory location (or a live object)
      accessible from all websites on a single machine (global to ISS)??
      >
      i can solve above problems by using disk files(IO) as shared resources
      or .NET Remoting etc. but i wonder if there a simple built-in
      mechanism
      >
      thanks in advance
      >

      Comment

      • coderr

        #4
        Re: Shared Global variable

        On Feb 18, 8:24 pm, Peter Bromberg [C# MVP]
        <pbromb...@yaho o.NoSpamMaam.co mwrote:
        To "share" objects between processes, you will need to use MemoryMappedFil es
        or NamedPipes.
        -- Peter
        Site:http://www.eggheadcafe.com
        UnBlog: htp://petesbloggerama .blogspot.com
        Short Urls & more:http://ittyurl.net
        >
        >
        >
        "coderr" wrote:
        hi folks,
        i have a simple question, I need a mechanism like Application State, a
        global variable in the memory which is shared by all clients and also
        i want to access it from a different PROCESS on the same server??
        >
         Another question: Is there a memory location (or a live object)
        accessible from all websites on a single machine (global to ISS)??
        >
        i can solve above problems by using disk files(IO) as shared resources
        or .NET Remoting etc. but i wonder if there a simple built-in
        mechanism
        >
        thanks in advance- Hide quoted text -
        >
        - Show quoted text -
        thanks

        Comment

        Working...