sharing memory between 2 apps

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

    #1

    sharing memory between 2 apps

    Hi,

    I have a console application and a web server which uses the same
    classes as the console application. Is there some way of sharing
    variables in these classes so that both the console app and the web
    services interface will reference the same memory? At the moment even
    though they are using the same classes, they are in different process
    space.

    Can you even attach to the console app .exe at run time? like a
    debugger?
  • richlm

    #2
    Re: sharing memory between 2 apps

    One approach would be to host your class in a separate process and call it
    as a "Singleton" via remoting, registering your class on the server side
    using something like:

    RemotingConfigu ration.Register WellKnownServic eType(System.Ty pe.GetType("Ser v
    erClass.myRemot eClass, ServerClass"), "RemoteTest ",
    WellKnownObject Mode.Singleton) ;

    For future compatibility (with ASP.NET 2.0) you are probably best off using
    http and not tcp for comminication, and hosting your class in IIS.

    Richard.

    "Phl" <killkennyhouse @hotmail.com> wrote in message
    news:55863e96.0 408100659.8a3de a@posting.googl e.com...[color=blue]
    > Hi,
    >
    > I have a console application and a web server which uses the same
    > classes as the console application. Is there some way of sharing
    > variables in these classes so that both the console app and the web
    > services interface will reference the same memory? At the moment even
    > though they are using the same classes, they are in different process
    > space.
    >
    > Can you even attach to the console app .exe at run time? like a
    > debugger?[/color]


    Comment

    Working...