Cas Sakal
Cas Sakal

Reputation: 213

Running a .NET Program as a Background Service

Here is the simple scenario that I want to apply;

  1. There is a .NET application(console or windows) appA and this code updates a large global variable(+50MB) in the project every 30sec.
  2. I have another application appB which is a .NET web application and I want to be able to access the updated value of global variable in appA from appB whenever I want.

What do you suggest to me for this purpose?

Upvotes: 0

Views: 272

Answers (3)

jerjer
jerjer

Reputation: 8760

If the 2 are running on the same machine, you can use the Registry or Store it on a file or database.

If it may run on different machine database might be the best alternative.

Upvotes: 0

Jason
Jason

Reputation: 1969

My initial thoughts are to have application A run as a windows service and have that write to some shared location for the web application.

Upvotes: 2

NoAlias
NoAlias

Reputation: 9193

Flat file, database, remoting, or sockets are some ways you can do it. The answer would vary based on certain factors, such as whether or not the data is sensitve, how many computers you plan on distributing the app to, and whether or not multiple instances of appA could exist.

Upvotes: 0

Related Questions