Skip to content

Instantly share code, notes, and snippets.

@Odonno
Created June 8, 2020 13:08
Show Gist options
  • Save Odonno/e25d49dea6b32c3d5db0d5b035d5e30b to your computer and use it in GitHub Desktop.
Save Odonno/e25d49dea6b32c3d5db0d5b035d5e30b to your computer and use it in GitHub Desktop.
.NET Core Azure Templates - SignalR
if (env.IsDevelopment())
{
services.AddSignalR().AddNewtonsoftJsonProtocol();
}
else
{
string azureSignalrConnectionString = configuration["Azure:SignalR:ConnectionString"];
services.AddSignalR().AddNewtonsoftJsonProtocol().AddAzureSignalR(options =>
{
options.ConnectionString = azureSignalrConnectionString;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment