Skip to content

Commit dfc37cd

Browse files
Merge pull request #208786 from grminch/gm-sgnlgh1
Fix GH issue 69510
2 parents 5d8388b + d92d58d commit dfc37cd

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

articles/azure-signalr/signalr-quickstart-dotnet-core.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Ready to start?
3232
## Prerequisites
3333

3434
* Install the [.NET Core SDK](https://dotnet.microsoft.com/download).
35-
* Download or clone the [AzureSignalR-sample](https://github.com/aspnet/AzureSignalR-samples) GitHub repository.
35+
* Download or clone the [AzureSignalR-sample](https://github.com/aspnet/AzureSignalR-samples) GitHub repository.
3636

3737
Having issues? Try the [troubleshooting guide](signalr-howto-troubleshoot-guide.md) or [let us know](https://aka.ms/asrs/qsnetcore).
3838

@@ -42,7 +42,7 @@ Having issues? Try the [troubleshooting guide](signalr-howto-troubleshoot-guide.
4242

4343
## Create an ASP.NET Core web app
4444

45-
In this section, you use the [.NET Core command-line interface (CLI)](/dotnet/core/tools/) to create an ASP.NET Core MVC web app project. The advantage of using the .NET Core CLI over Visual Studio is that it's available across the Windows, macOS, and Linux platforms.
45+
In this section, you use the [.NET Core command-line interface (CLI)](/dotnet/core/tools/) to create an ASP.NET Core MVC web app project. The advantage of using the .NET Core CLI over Visual Studio is that it's available across the Windows, macOS, and Linux platforms.
4646

4747
1. Create a folder for your project. This quickstart uses the *E:\Testing\chattest* folder.
4848

@@ -82,13 +82,19 @@ In this section, you'll add the [Secret Manager tool](/aspnet/core/security/app-
8282
dotnet add package Microsoft.Azure.SignalR
8383
```
8484
85-
2. Run the following command to restore packages for your project:
85+
1. Run the following command to restore packages for your project:
8686
8787
```dotnetcli
8888
dotnet restore
8989
```
9090
91-
3. Add a secret named *Azure:SignalR:ConnectionString* to Secret Manager.
91+
1. Prepare the Secret Manager for use with this project.
92+
93+
````dotnetcli
94+
dotnet user-secrets init
95+
````
96+
97+
1. Add a secret named *Azure:SignalR:ConnectionString* to Secret Manager.
9298
9399
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 to establish a connection. Replace the value in the following command with the connection string for your SignalR Service resource.
94100
@@ -102,8 +108,7 @@ In this section, you'll add the [Secret Manager tool](/aspnet/core/security/app-
102108
103109
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](/dotnet/core/extensions/configuration-providers#environment-variable-configuration-provider).
104110
105-
106-
4. Open *Startup.cs* and update the `ConfigureServices` method to use Azure SignalR Service by calling the `AddSignalR()` and `AddAzureSignalR()` methods:
111+
1. Open *Startup.cs* and update the `ConfigureServices` method to use Azure SignalR Service by calling the `AddSignalR()` and `AddAzureSignalR()` methods:
107112
108113
```csharp
109114
public void ConfigureServices(IServiceCollection services)
@@ -115,7 +120,7 @@ In this section, you'll add the [Secret Manager tool](/aspnet/core/security/app-
115120
116121
Not passing a parameter to `AddAzureSignalR()` causes this code to use the default configuration key for the SignalR Service resource connection string. The default configuration key is *Azure:SignalR:ConnectionString*.
117122
118-
5. In *Startup.cs*, update the `Configure` method by replacing it with the following code.
123+
1. In *Startup.cs*, update the `Configure` method by replacing it with the following code.
119124
120125
```csharp
121126
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
@@ -341,7 +346,6 @@ In this section, you'll add a development runtime environment for ASP.NET Core.
341346
}
342347
```
343348

344-
345349
## Build and run the app locally
346350

347351
1. To build the app by using the .NET Core CLI, run the following command in the command shell:
@@ -375,7 +379,6 @@ In this section, you'll add a development runtime environment for ASP.NET Core.
375379

376380
![Example of an Azure SignalR group chat](media/signalr-quickstart-dotnet-core/signalr-quickstart-complete-local.png)
377381

378-
379382
## Clean up resources
380383

381384
If you'll continue to the next tutorial, you can keep the resources created in this quickstart and reuse them.

0 commit comments

Comments
 (0)