473,396 Members | 1,590 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,396 software developers and data experts.

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
Feb 18 '08 #1
3 1820
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
Feb 18 '08 #2
To "share" objects between processes, you will need to use MemoryMappedFiles
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
Feb 18 '08 #3
On Feb 18, 8:24*pm, Peter Bromberg [C# MVP]
<pbromb...@yahoo.NoSpamMaam.comwrote:
To "share" objects between processes, you will need to use MemoryMappedFiles
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
Feb 18 '08 #4

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

Similar topics

1
by: MackS | last post by:
Hello everyone Consider the following two simple files. The first is my "program", the other a file holding some global variable definitions and code shared by this program and a "twin" program...
10
by: darrel | last post by:
I'm still trying to sort out in my head the differences between public and shared when referring to declaring properties or variables. This is my understanding: shared - akin to a 'global'...
15
by: Rob Nicholson | last post by:
A consequence of the ASP.NET architecture on IIS has just hit home with a big thud. It's to do with shared variables. Consider a module like this: Public Module Functions Public GlobalName As...
8
by: Mark Kamoski | last post by:
Hi Everyone-- Please help. What are the implications, (in terms of memory, application footprint, resource use, threading, and so forth), of using Shared methods? These Shared classes raise...
9
by: Bob Day | last post by:
VS 2003, vb.net , sql msde... I have an application with multiple threads running. Its a telephony application where each thread represents a telephone line. For code that would be the same...
1
by: Darin | last post by:
I have an application that is one EXE with mutliple DLL's. In one of the DLL's (libs.dll) that the EXE has refeneced, I have: Public Class Globals Public Shared gLogin as String End Class ...
11
by: eBob.com | last post by:
I have this nasty problem with Shared methods and what I think of as "global storage" - i.e. storage declared outside of any subroutines or functions. In the simple example below this "global"...
1
by: viraj.kadakia | last post by:
I observe a behavior with shared libraries (.so) and global variables that I cannot understand ... I'd appreciate if someone can explain the behavior .. Scenario 1: aTest is an executable on...
3
by: ankugoe7 | last post by:
Is it possible to share global variables such that all applications which use shared libraries can see the changes made to the global variables by the other applications.
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:
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
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.