473,386 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

sharing memory between 2 apps

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?
Jul 21 '05 #1
2 1322
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.

"Phl" <ki************@hotmail.com> wrote in message
news:55************************@posting.google.com ...
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?

Jul 21 '05 #2
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.

"Phl" <ki************@hotmail.com> wrote in message
news:55************************@posting.google.com ...
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?

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Terence | last post by:
Does anyone have any experiences to share regarding this? we run a ColdFusion/PHP/Java(cocoon) environment and I'll probably figure out a way for all apps to be able to share sessions. I wanted...
0
by: Phl | last post by:
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...
13
by: Selma_g | last post by:
Hi, I am wondering if the bufferpools and agent memory canbe shared within a EE UDB instance (running 7.2 AIX 5 now but going to V8.1). Our business model requires us to add about 1-2 db's per...
2
by: Vitaly | last post by:
Hi, I've encountered a problem sharing c# application in NetMeeting. The problem is that when I try to share some GUI application, I don't see it on remote computer. Sometimes I see random small...
3
by: grooby | last post by:
I would like to develop an asp.net Web application using muliple web projects under one solution file and share the session information between web applications( or projects). Is this possible?
3
by: Shikari Shambu | last post by:
Hi All, I have a situation where multiple applications are sharing some pages/ controls. So, I have a separate common project that has the common pages/ controls. My question is how do I...
11
by: Max Vit | last post by:
I have deployed few Access apps splitting it in Front End and Back End. Our environment uses Win XP SP2 for clients, Win 2k3 for servers and Access 2003. The max. number of clients is about 50...
19
by: Zytan | last post by:
I want multiple instances of the same .exe to run and share the same data. I know they all can access the same file at the same time, no problem, but I'd like to have this data in RAM, which they...
9
by: Peri | last post by:
Dear All, Is there a way in which 2 application can share a common memory location to access static data? Say for example I have a product master data that is available in a single place, and...
2
by: Jeff Dege | last post by:
I'm working with a group that's been doing C++ coding for quite a long time, now, and in that environment we've pretty much worked out development practices that serve us well. We've been doing...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.