Relative Content

Tag Archive for asp.net-mvcmultithreadingsocketsiislong-running-processes

Long running background thread terminated in ASP.NET

I’ve built an ASP.NET MVC web server that connects to a hardware device via a socket. The idea is to spawn a thread that opens a socket and listens for TCP packages from the hardware. Since the hardware performs a long-running task that takes a significant amount of time to complete (years), I want to keep the thread alive as long as possible to monitor the process using SignalR and save some data to the database.