sharing memory between 2 apps

  • Thread starter Thread starter Phl
  • Start date Start date
P

Phl

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?
 
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:

RemotingConfiguration.RegisterWellKnownServiceType(System.Type.GetType("Serv
erClass.myRemoteClass, ServerClass"), "RemoteTest",
WellKnownObjectMode.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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top