473,396 Members | 1,671 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.

Accessing a Shared Variable

I have a windows service developed in VB.NET that has a shared
variable. I would like to access the value of this variable from a
separate VB.NET windows app which is on the same server.

Is this possible? I would like to stay away from Remoting if possible.
Can anyone give me some ideas of how I might do this?

Thanks,
Micky

Nov 21 '05 #1
7 2217
One option is to have the service write to registry on a periodic basis.
Then the Windows app could read it from there.

Will this fit for your situation?

"MickyM" <ja******@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I have a windows service developed in VB.NET that has a shared
variable. I would like to access the value of this variable from a
separate VB.NET windows app which is on the same server.

Is this possible? I would like to stay away from Remoting if possible.
Can anyone give me some ideas of how I might do this?

Thanks,
Micky
Nov 21 '05 #2
No, actually, I need to be able to read it from "memory." I can't
write out the value to the registry or the file system.

Anything else?

Thanks,
Micky

Nov 21 '05 #3
I don't think you can just access memory that is running in another process.

You would have to use remoting to ask for the variable.

But, I think Siva's recommendation is your best bet.

"MickyM" <ja******@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
No, actually, I need to be able to read it from "memory." I can't
write out the value to the registry or the file system.

Anything else?

Thanks,
Micky

Nov 21 '05 #4
The root of the problem is always more complicated. :) Here's the
real reason I need this and I probably need to post this in a different
group, but here goes:

We have 4 web servers that connect to our database servers. User
passwords and other data is stored encrypted in the database. In order
to decrypt the data, an encryption object is currently on each of the
web servers with the encryption key compiled into it. We were looking
for a more secure way of storing the encryption key. To be honest, I
think making the key available in a variable that is accessible is less
secure than having it compiled in the code.

Anyone have experience on this that can suggest how to keep the key
private and secure while having to make it available to code that is
run 24/7 without human intervention?

Does this make sense?

Thanks,
Micky

Nov 21 '05 #5
But wouldn't the windows service also have to have the key compiled into it,
and it would just put this out in a variable?

At some point, somewhere, you are going to have the key compiled into
something? Or in some sort of file or registry setting? It's got to to be
somewhere!

Are you worried about someone gaining access to your web server, and
decompiling your DLL's to see the key?

"MickyM" <ja******@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
The root of the problem is always more complicated. :) Here's the
real reason I need this and I probably need to post this in a different
group, but here goes:

We have 4 web servers that connect to our database servers. User
passwords and other data is stored encrypted in the database. In order
to decrypt the data, an encryption object is currently on each of the
web servers with the encryption key compiled into it. We were looking
for a more secure way of storing the encryption key. To be honest, I
think making the key available in a variable that is accessible is less
secure than having it compiled in the code.

Anyone have experience on this that can suggest how to keep the key
private and secure while having to make it available to code that is
run 24/7 without human intervention?

Does this make sense?

Thanks,
Micky

Nov 21 '05 #6
The windows service isn't going to have it compiled in it. It is going
to get it from a text file shared on another machine...I know....I know
:) (it will get the file when the computer first boots up with a
human there to enter in their username and password to get the file).

The main worry is exactly as you stated. Someone hacking the machine
and then decompiling to get the key. (Which to me sounds a lot harder
than getting around file permissions to get the key from a text
file...I mean the person did hack their way onto the computer right?)

We are trying to become PCI/CISP compliant. We had our first security
audit the other day and the auditor didn't like the idea of the key
being compiled in the code. I agree that it isn't exactly secure, but
I can't think of anything else that is more secure for this situation.
Any ideas would be greatly appreciated.

Thanks,
Micky

Nov 21 '05 #7
Does anyone know of a good newsgroup I could discuss this encryption
issue in?

Thanks,
Micky

Nov 21 '05 #8

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

Similar topics

1
by: Mike Frayn | last post by:
Hello there. I'm kinda new to Java, did some last year and have forgotten it all, but am experienced enough with C++. I have a problem here that I would imagine is solved very easily. I have...
5
by: hellrazor | last post by:
Hi, (new to webservices here) Is it possible to access a class instance variable defined in a webservice? I want to access this variable, in addition to the data being returned by the . so...
2
by: Ekul | last post by:
I have an application that allows users to login and logout. I track how many users are logged in and when each individual is logged in. The application will not allow concurrent logins(let a...
2
by: Nathan Sokalski | last post by:
I would like to access variables and functions that I declare in the Global.asax.vb file. However, I am having trouble doing that. What does the declaration have to look like in the Global.asax.vb...
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...
8
by: dwok | last post by:
I have been wondering this for a while now. Suppose I have a class that contains some private member variables. How should I access the variables throughout the class? Should I use properties that...
2
by: Jon C | last post by:
Hi, I've written a multi-threaded web spider which stores search results in a Shared ArrayList. Since each thread can launch further threads, the problem I have is pausing my main sub until all...
2
by: baldwin | last post by:
Hello, We are going to have a web application that will be load balanced. Uploading documents into the same server is not an option. So we need to create a shared folder in a different machine...
2
by: Bob | last post by:
I'm trying to use the process class through an instance of the class. As follows, Dim MyProc as Process = Myproc.start(Filename) (where filename is a string variable having the full path of the...
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: 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
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.