You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-signalr/signalr-quickstart-dotnet-core.md
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,13 +5,13 @@ author: sffamily
5
5
ms.service: signalr
6
6
ms.devlang: dotnet
7
7
ms.topic: quickstart
8
-
ms.date: 03/01/2019
8
+
ms.date: 11/04/2019
9
9
ms.author: zhshang
10
10
---
11
11
# Quickstart: Create a chat room by using SignalR Service
12
12
13
13
14
-
Azure SignalR Service is an Azure service that helps developers easily build web applications with real-time features. This service is based on [SignalR for ASP.NET Core 2.0](https://docs.microsoft.com/aspnet/core/signalr/introduction).
14
+
Azure SignalR Service is an Azure service that helps developers easily build web applications with real-time features. This service is based on [SignalR for ASP.NET Core 2.1](https://docs.microsoft.com/aspnet/core/signalr/introduction?view=aspnetcore-2.1), but also supports [SignalR for ASP.NET Core 3.0](https://docs.microsoft.com/aspnet/core/signalr/introduction?view=aspnetcore-3.0).
15
15
16
16
This article shows you how to get started with the Azure SignalR Service. In this quickstart, you'll create a chat application by using an ASP.NET Core MVC web app. This app will make a connection with your Azure SignalR Service resource to enable real-time content updates. You'll host the web application locally and connect with multiple browser clients. Each client will be able to push content updates to all other clients.
17
17
@@ -89,7 +89,7 @@ In this section, you'll add the [Secret Manager tool](https://docs.microsoft.com
89
89
This secret is accessed with the Configuration API. A colon (:) works in the configuration name with the Configuration API on all supported platforms. See [Configuration by environment](https://docs.microsoft.com/aspnet/core/fundamentals/configuration/index?tabs=basicconfiguration&view=aspnetcore-2.0).
90
90
91
91
92
-
4. Open *Startup.cs* and update the `ConfigureServices` method to use Azure SignalR Service by calling the `services.AddSignalR().AddAzureSignalR()` method:
92
+
4. Open *Startup.cs* and update the `ConfigureServices` method to use Azure SignalR Service by calling the `services.AddSignalR().AddAzureSignalR()` method for ASP.NET Core 2 only:
93
93
94
94
```csharp
95
95
public void ConfigureServices(IServiceCollection services)
@@ -98,10 +98,11 @@ In this section, you'll add the [Secret Manager tool](https://docs.microsoft.com
98
98
services.AddSignalR().AddAzureSignalR();
99
99
}
100
100
```
101
+
For ASP.NET Core 3+, there is no change needed for `ConfigureServices` method.
101
102
102
103
By not passing a parameter to `AddAzureSignalR()`, this code uses the default configuration key for the SignalR Service resource connection string. The default configuration key is *Azure:SignalR:ConnectionString*.
103
104
104
-
5. Also in *Startup.cs*, update the `Configure` method by replacing the call to `app.UseStaticFiles()` with the following code and save the file.
105
+
5. Also in *Startup.cs*, update the `Configure` method by replacing the call to `app.UseStaticFiles()` with the following code and save the file, for ASP.NET Core 2 only.
105
106
106
107
```csharp
107
108
app.UseFileServer();
@@ -110,6 +111,18 @@ In this section, you'll add the [Secret Manager tool](https://docs.microsoft.com
0 commit comments