Hy everybody,
i developed an ASP.NET Core 3.1 (soon .NET 6) Web Application which is connected to an ATM-API.
The ATM-API requires that i hold static variables at the server.
Unfortunately the objects are not serializeable.
The App is hosted on IIS 10 on a Windows Server 2019.
I know that the static variables get lost, when e.g. the Application Pool recycles.
But the static variables should not get lost. Now i am thinking about possible Solutions and i don´t know, which way i should go.
These Solutions came into my mind:
- Write a Windows Service where i hold the static variables and call it (somehow) from my ASP.NET Core App.
- Preventing the Application Pool from recycling at least during the Service-Time 7:30 to 18:00. I researched for this solution but it looks like that i cant fully prevent it. But maybe i don´t found the solution yet.
Maybe someone of you has a great idea :-). Thank you very much :-).