I have an ASP.NET app that has a presentation layer, data, business, entities, etc.
One of the peculiarities of the presentation layer is that in the beginning it executes a task in 2nd plane whose mission is to generate every X seconds the sending of a message through the network. This task is encapsulated in another project of type class library
.
As part of this message, I need to send the user who logged in to the application, data that I do not have when I start the application but I get it later on a login screen.
In a first idea to pass this data through a global variable that modified its value at the time of login and then, from the function that sends the message, retrieve it to send it. This I tried using the file global.asax
of the application and I could save the value without problems, since the login is in the main application MVC.
I need to be able to read that file from class library
and I can not find how to do that, since in that library
I do not have access to the session variables.
Any other ideas on how to do this task?
Greetings and thanks for your time.