dotnet / dotnet/AspNetCore.Docs
Signalr host in "worker project"
- Dominant language
- C#
- Stars
- 13.1k
- Forks
- 24.6k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 97
Description
It would be nice if there was an example, or at least some notes, on how to host signalr in a "worker project", using webapp servers as clients.
I can't find any info on what aspnetcore signalr package to include to make it work.
At the end i saw this sample:
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/signalr/background-service/samples/6.0/Server/Server.csproj
which uses the "Microsoft.NET.Sdk.Web" instead of the "Microsoft.NET.Sdk.Worker" sdk, changed it in the project file and also removed the "Microsoft.Extensions.Hosting" package since it's not needed as this page says:
https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/hosted-services?view=aspnetcore-6.0&tabs=visual-studio#worker-service-template
It seems to work now, but it would be nice to have official docs about it.
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: 1bbb2d1c-4dfe-3faf-d4b0-65ae1146961e
* Version Independent ID: 6b203f18-adfa-3a18-183d-b124325064c3
* Content: [Host ASP.NET Core SignalR in background services](https://docs.microsoft.com/en-us/aspnet/core/signalr/background-services?view=aspnetcore-6.0#call-a-signalr-hub-from-a-background-service)
* Content Source: [aspnetcore/signalr/background-services.md](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/signalr/background-services.md)
* Product: **aspnet-core**
* Technology: **aspnetcore-signalr**
* GitHub Login: @bradygaster
* Microsoft Alias: **bradyg**
Contributor guide
Assessment
This issue has not been assessed yet.