-
Using visual studio 2022, .NetCore 8 and SignalR. When running in debug mode the IHosted service works flawlessly, when I move the project to IIS I cannot get the background task to run. It just does not seem to start. I want to be able to send SignalR notifications via data driven logic. I followed all the notes for setting up the pool and app. Does anyone have any suggestions as to get this to work? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
IIS starts the worker process for the app-pool lazy, i.e. only when there are requests to handle. So please check in Window's task manager if the Then also keep in mind that the app-pool may be shutdown if idle or be recycled according the app-pool configuration. A standard windows-service is maybe a better fit for your application. |
Beta Was this translation helpful? Give feedback.
-
I am running a blazor server app on a hosted IIS VM in Azure. As @gfoidl mentioned, the recycling of the App-Pool is a major issue with persistent Apps. There is no clear way of keeping a blazor server app running or users logged in since th SignalR and other connections are reset when the App-Pool is recycled. For my part, since most of our workers are between 8am and 5pm, I've set the application recycling to specific hours outside the "work hours" in order to circumvent the problem. Hope this helps, although it has already been answered. |
Beta Was this translation helpful? Give feedback.
IIS starts the worker process for the app-pool lazy, i.e. only when there are requests to handle. So please check in Window's task manager if the
w3wp.exe
is running using the app-pool's identity.Then also keep in mind that the app-pool may be shutdown if idle or be recycled according the app-pool configuration.
A standard windows-service is maybe a better fit for your application.