Skip to content

Commit f6a622b

Browse files
authored
resolve comments
1 parent 5a5e99c commit f6a622b

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

articles/azure-signalr/signalr-howto-use.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,18 @@ ms.author: lianwei
1010

1111
# Use Azure SignalR Service
1212

13+
14+
This article shows you how to use SDK in your app server side to connect to SignalR Service when you are using SignalR in your app server.
15+
1316
## Create an Azure SignalR Service instance
1417

1518
Follow [Quickstart: Use an ARM template to deploy Azure SignalR](./signalr-quickstart-azure-signalr-service-arm-template.md) to create a SignalR service instance.
1619

17-
## For ASP.NET Core SignalR
20+
## For ASP.NET Core SignalR
1821

19-
### 1. Install the SDK
22+
### Install the SDK
2023

21-
Run the command to install SignalR Service SDK to your ASP.NET Core project.
24+
Run the command to install SignalR Service SDK to your ASP.NET Core project.
2225

2326
```bash
2427
dotnet add package Microsoft.Azure.SignalR
@@ -42,7 +45,7 @@ public void Configure(IApplicationBuilder app)
4245
}
4346
```
4447

45-
### 2. Configure Connection String
48+
### Configure connection string
4649

4750
There are two approaches to configure SignalR Service's connection string in your application.
4851

@@ -62,7 +65,7 @@ There are two approaches to configure SignalR Service's connection string in you
6265
.AddAzureSignalR(options => options.ConnectionString = "<replace with your connection string>");
6366
```
6467

65-
### 3. Configure options
68+
### Configure options
6669

6770
There are a few [options](https://github.com/Azure/azure-signalr/blob/dev/src/Microsoft.Azure.SignalR/ServiceOptions.cs) you can customize when using Azure SignalR Service SDK.
6871
@@ -106,7 +109,7 @@ You can increase this value to avoid client disconnect.
106109
#### `AccessTokenAlgorithm`
107110

108111
- Default value is `HS256`
109-
- This option provides choice of [`SecurityAlgorithms`](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/dev/src/Microsoft.IdentityModel.Tokens/SecurityAlgorithms.cs) when generate access token. Now supported optional values are `HS256` and `HS512`. Note `HS512` is more secure but the generated token is comparatively longer than that using `HS256`.
112+
- This option provides choice of [`SecurityAlgorithms`](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/dev/src/Microsoft.IdentityModel.Tokens/SecurityAlgorithms.cs) when generate access token. Now supported optional values are `HS256` and `HS512`. Note that `HS512` is more secure but the generated token is comparatively longer than that using `HS256`.
110113
111114
#### `ServerStickyMode`
112115

@@ -145,7 +148,7 @@ You can increase this value to avoid client disconnect.
145148
- This option defines the max poll interval allowed for `LongPolling` connections in Azure SignalR Service. If the next poll request doesn't come in within `MaxPollIntervalInSeconds`, Azure SignalR Service cleans up the client connection. Note that Azure SignalR Service also cleans up connections when cached waiting to write buffer size is greater than `1Mb` to ensure service performance.
146149
- The value is limited to `[1, 300]`.
147150

148-
### 4. Sample
151+
### Sample
149152

150153
You can configure above options like the following sample code.
151154

@@ -162,15 +165,15 @@ services.AddSignalR()
162165
});
163166
```
164167

165-
## For the legacy ASP&#46;NET SignalR
168+
## For the legacy ASP.NET SignalR
166169

167170
> [!NOTE]
168171
>
169-
> If it is your first time trying SignalR, we recommend you use the [ASP&#46;NET Core SignalR](/aspnet/core/signalr/introduction), it is **simpler, more reliable, and easier to use**.
172+
> If it is your first time trying SignalR, we recommend you use the [ASP.NET Core SignalR](/aspnet/core/signalr/introduction), it is **simpler, more reliable, and easier to use**.
170173

171-
### 1. Install the SDK
174+
### Install the SDK
172175

173-
Install SignalR Service SDK to your ASP&#46;NET project with **Package Manager Console**:
176+
Install SignalR Service SDK to your ASP.NET project with **Package Manager Console**:
174177

175178
```powershell
176179
Install-Package Microsoft.Azure.SignalR.AspNet
@@ -185,7 +188,7 @@ public void Configuration(IAppBuilder app)
185188
}
186189
```
187190

188-
### 2. Configure Connection String
191+
### Configure connection string
189192

190193
Set the connection string in the `web.config` file, to the `connectionStrings` section:
191194

@@ -198,7 +201,7 @@ Set the connection string in the `web.config` file, to the `connectionStrings` s
198201
</configuration>
199202
```
200203

201-
### 3. Configure options
204+
### Configure options
202205

203206
There are a few [options](https://github.com/Azure/azure-signalr/blob/dev/src/Microsoft.Azure.SignalR.AspNet/ServiceOptions.cs) you can customize when using Azure SignalR Service SDK.
204207
@@ -241,7 +244,7 @@ You can increase this value to avoid client disconnect.
241244
#### `AccessTokenAlgorithm`
242245

243246
- Default value is `HS256`
244-
- This option provides choice of [`SecurityAlgorithms`](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/dev/src/Microsoft.IdentityModel.Tokens/SecurityAlgorithms.cs) when generate access token. Now supported optional values are `HS256` and `HS512`. Note `HS512` is more secure but the generated token is comparatively longer than that using `HS256`.
247+
- This option provides choice of [`SecurityAlgorithms`](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/dev/src/Microsoft.IdentityModel.Tokens/SecurityAlgorithms.cs) when generate access token. Now supported optional values are `HS256` and `HS512`. Note that `HS512` is more secure but the generated token is comparatively longer than that using `HS256`.
245248
246249
#### `ServerStickyMode`
247250

@@ -271,7 +274,7 @@ app.Map("/signalr",subApp => subApp.RunAzureSignalR(this.GetType().FullName, new
271274
}));
272275
```
273276

274-
## Scale Out Application Server
277+
## Scale out application server
275278

276279
With Azure SignalR Service, persistent connections are offloaded from application server so that you can focus on implementing your business logic in hub classes.
277280
But you still need to scale out application servers for better performance when handling massive client connections.

0 commit comments

Comments
 (0)