Created
June 8, 2020 13:08
-
-
Save Odonno/e25d49dea6b32c3d5db0d5b035d5e30b to your computer and use it in GitHub Desktop.
.NET Core Azure Templates - SignalR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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