Obviously it has several solutions and without knowing each detail I would not know to state which the best.
If you just need to be in the current application you can use the HttpContext.Application
(See also the stately object). This is just a specific dictionary that can hold any data. Example of use. And examples applied.
Other more manual mechanisms can be used, some based on the cache system.
If you need something external to the application could even be a service that stores this in memory, but has simpler solution that should meet the requirements. Play in a file that can be read. I doubt you’ll find a simpler solution.
If you have competition problems from who will write this and do not want to deal on their own in the file play in a database, even if it is Sqlite. Many would already opt for this by default. If you already use it, it might even be better. If you use a database (probably), creating a table with a column and a row is so simple that I don’t see why not (there could be some reason, but nothing described indicates this).
It has more complex but unnecessary solutions.
Something that might help.
When you refer to the server would it be where the application is hosted? or another application that will access? Ta a little confusing that there.
– Marco Souza
Just a server? Is the volume large? Temporary how much? While the session lasts? Give more context.
– Maniero
@Marconciliosouza edited the question, server = server-side of the application, I wrote only to make clear that I want to have access to the data at any time, as if I were consulting a database.
– Zignd
@bigown why would it have more than one server? About the volume, as I said, it’s just a string, it’s basically an id. About the session time, as I said, the application will manage when the string will be deleted from that "Storage".
– Zignd
So this
id
can survive for several sessions? Just by having oneid
each time on the server? It is a "static" data of the application and not of the session, it is not quite temporary, it is just unnecessary at all times?– Maniero
Yes, it can survive for several sessions. But it won’t be stored forever in the application. In my case, this data has a lifespan of less than 3 hours.
– Zignd