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
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,16 +89,21 @@ In this section, you will add the [Secret Manager tool](https://docs.microsoft.c
89
89
90
90
dotnet restore
91
91
92
-
3. Add a secret named *Azure__SignalR__ConnectionString* to Secret Manager. This secret is a hierarchical config value, and a colon (:) may not work on all platforms. Double underscore (__), as used by this secret, is supported by all platforms. This secret will contain the connection string to access your SignalR Service resource. *Azure__SignalR__ConnectionString* is the default configuration key that SignalR looks for in order to establish a connection. Replace the value in the command below with the connection string for your SignalR Service resource.
92
+
3. Add a secret named *Azure:SignalR:ConnectionString* to Secret Manager.
93
+
94
+
This secret will contain the connection string to access your SignalR Service resource. *Azure:SignalR:ConnectionString* is the default configuration key that SignalR looks for in order to establish a connection. Replace the value in the command below with the connection string for your SignalR Service resource.
93
95
94
96
This command must be executed in the same directory as the *.csproj* file.
95
97
96
98
```
97
-
dotnet user-secrets set Azure__SignalR__ConnectionString "Endpoint=<Your endpoint>;AccessKey=<Your access key>;"
99
+
dotnet user-secrets set Azure:SignalR:ConnectionString "Endpoint=<Your endpoint>;AccessKey=<Your access key>;"
98
100
```
99
101
100
102
Secret Manager will only be used for testing the web app while it is hosted locally. In a later tutorial, you will deploy the chat web app to Azure. Once the web app is deployed to Azure, you will use an application setting instead of storing the connection string with Secret Manager.
101
103
104
+
This secret is a 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#configuration-by-environment).
105
+
106
+
102
107
4. Open *Startup.cs* and update the `ConfigureServices` method to use Azure SignalR Service by calling the `services.AddSignalR().AddAzureSignalR()` method:
103
108
104
109
```csharp
@@ -109,7 +114,7 @@ In this section, you will add the [Secret Manager tool](https://docs.microsoft.c
109
114
}
110
115
```
111
116
112
-
By not passing a parameter to `AddAzureSignalR()`, this code uses the default configuration key, *Azure__SignalR__ConnectionString*, for the SignalR Service resource connection string.
117
+
By not passing a parameter to `AddAzureSignalR()`, this code uses the default configuration key, *Azure:SignalR:ConnectionString*, for the SignalR Service resource connection string.
113
118
114
119
5. Also in *Startup.cs*, update the `Configure` method by replacing the call to `app.UseStaticFiles()` with the following code and save the file.
0 commit comments