{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/Docs/pulls/comments/193845853","pull_request_review_id":126897067,"id":193845853,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5Mzg0NTg1Mw==","diff_hunk":"@@ -0,0 +1,124 @@\n+---\n+title: ASP.NET Core SignalR Configuration\n+author: rachelappel\n+description: Configure ASP.NET Core SignalR Apps\n+manager: wpickett\n+monikerRange: '>= aspnetcore-2.1'\n+ms.author: rachelap\n+ms.date: 06/30/2018\n+ms.prod: asp.net-core\n+ms.technology: aspnet\n+ms.topic: article\n+uid: signalr/configuration\n+---\n+\n+# ASP.NET Core SignalR Configuration\n+\n+## [JSON]( https://github.com/aspnet/SignalR/blob/dev/src/Microsoft.AspNetCore.SignalR.Protocols.Json/JsonHubProtocolOptions.cs)/[MessagePack](https://github.com/aspnet/SignalR/blob/dev/src/Microsoft.AspNetCore.SignalR.Protocols.MessagePack/MessagePackHubProtocolOptions.cs) serialization options\n+\n+MessagePack is a binary serialization format that provides serialization options for server and client. \n+\n+```csharp\n+using Microsoft.Extensions.DependencyInjection\n+\n+var connection = new HubConnectionBuilder()\n+    .WithUrl(\"...\")\n+    .AddJsonHubProtocol(options => {\n+        // options.PayloadSerializerSettings is a JSON.NET JsonSerializerSettings used to \n+        // configure how the payload is serialized\n+        // Example: PascalCase JSON (camelCase by default)\n+        options.PayloadSerializerSettings.ContractResolver = new DefaultContractResolver();\n+    })\n+    .Build();\n+```\n+\n+### [HubConnection](https://github.com/aspnet/SignalR/blob/dev/src/Microsoft.AspNetCore.SignalR.Client.Core/HubConnection.cs#L66) options\n+\n+The following table describes the `HubConnection` options for configuring the client:\n+\n+| Option | Description |\n+| ------ | ----------- |\n+| `ServerTimeout` | If the server doesn't respond within this time interval, the connection closes |\n+| `HandshakeTimeout`  | If the server doesn't respond to the initial handshake message within this time interval, the connection closes |\n+| `PingInterval` (added in 2.2) | If the client hasn't sent a message within this interval, a ping message is sent automatically to keep the connection open |\n+\n+### [HubOptions](https://github.com/aspnet/SignalR/blob/dev/src/Microsoft.AspNetCore.SignalR.Core/HubOptions.cs)\n+\n+The following table describes the `HubOptions` options for configuring the hub:\n+\n+| Option | Description |\n+| ------ | ----------- |\n+| `HandshakeTimeout` | If the client doesn't send an initial handshake message within this time interval, the connection will be closed |\n+| `KeepAliveInterval` | If the server hasn't sent a message within this interval, a ping message will is sent automatically to keep the connection open |\n+| `SupportedProtocols` | Protocols supported by this hub. For example, disabling JSON or MessagePack for certain hubs |\n+| `EnableDetailedErrors` | If true, sends detailed error messages to the client when exceptions occur. This may contain sensitive data and is `false` by default |\n+\n+The `HubOptions` are configured in the `ConfigureServices` method of the `Startup` class, as shown in the following code sample:\n+\n+```csharp\n+public void ConfigureServices(IServiceCollection services)\n+{\n+    services.AddSignalR(hubOptions =>\n+    {\n+        hubOptions.EnableDetailedErrors = true;\n+        hubOptions.KeepAliveInterval = TimeSpan.FromMinutes(1);\n+    })\n+}\n+```\n+\n+Strongly-typed [HubOptions<T>](https://github.com/aspnet/SignalR/blob/dev/src/Microsoft.AspNetCore.SignalR.Core/HubOptions.cs) can be configured as follows: ","path":"aspnetcore/signalr/Configuration.md","position":69,"original_position":69,"commit_id":"67ba79040d2a1dfca859a1dc6d8d42bec85b2bc7","original_commit_id":"67ba79040d2a1dfca859a1dc6d8d42bec85b2bc7","user":{"login":"anurse","id":7574,"node_id":"MDQ6VXNlcjc1NzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/7574?v=4","gravatar_id":"","url":"https://api.github.com/users/anurse","html_url":"https://github.com/anurse","followers_url":"https://api.github.com/users/anurse/followers","following_url":"https://api.github.com/users/anurse/following{/other_user}","gists_url":"https://api.github.com/users/anurse/gists{/gist_id}","starred_url":"https://api.github.com/users/anurse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anurse/subscriptions","organizations_url":"https://api.github.com/users/anurse/orgs","repos_url":"https://api.github.com/users/anurse/repos","events_url":"https://api.github.com/users/anurse/events{/privacy}","received_events_url":"https://api.github.com/users/anurse/received_events","type":"User","site_admin":false},"body":"Strongly-typed [HubOptions<T>](https://github.com/aspnet/SignalR/blob/dev/src/Microsoft.AspNetCore.SignalR.Core/HubOptions.cs) can be configured as follows: \r\n\r\n->\r\n\r\nThe options configured in `AddSignalR` apply to all Hubs on the server. To configure options for a specific hub, use `.AddHubOptions<HubType>`, as in the below snippet:\r\n\r\n[same snippet, but rename `HubName` to `HubType`, since it's important to make clear that this should be the name of your Hub class]","created_at":"2018-06-07T18:25:51Z","updated_at":"2018-06-07T18:38:37Z","html_url":"https://github.com/aspnet/Docs/pull/6852#discussion_r193845853","pull_request_url":"https://api.github.com/repos/aspnet/Docs/pulls/6852","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/aspnet/Docs/pulls/comments/193845853"},"html":{"href":"https://github.com/aspnet/Docs/pull/6852#discussion_r193845853"},"pull_request":{"href":"https://api.github.com/repos/aspnet/Docs/pulls/6852"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/Docs/pulls/6852","id":192444814,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyNDQ0ODE0","html_url":"https://github.com/aspnet/Docs/pull/6852","diff_url":"https://github.com/aspnet/Docs/pull/6852.diff","patch_url":"https://github.com/aspnet/Docs/pull/6852.patch","issue_url":"https://api.github.com/repos/aspnet/Docs/issues/6852","number":6852,"state":"open","locked":false,"title":"signalr/configuration draft","user":{"login":"rachelappel","id":1857975,"node_id":"MDQ6VXNlcjE4NTc5NzU=","avatar_url":"https://avatars2.githubusercontent.com/u/1857975?v=4","gravatar_id":"","url":"https://api.github.com/users/rachelappel","html_url":"https://github.com/rachelappel","followers_url":"https://api.github.com/users/rachelappel/followers","following_url":"https://api.github.com/users/rachelappel/following{/other_user}","gists_url":"https://api.github.com/users/rachelappel/gists{/gist_id}","starred_url":"https://api.github.com/users/rachelappel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rachelappel/subscriptions","organizations_url":"https://api.github.com/users/rachelappel/orgs","repos_url":"https://api.github.com/users/rachelappel/repos","events_url":"https://api.github.com/users/rachelappel/events{/privacy}","received_events_url":"https://api.github.com/users/rachelappel/received_events","type":"User","site_admin":false},"body":"https://github.com/aspnet/Docs/issues/6599\r\n","created_at":"2018-06-04T15:24:59Z","updated_at":"2018-06-07T18:38:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b2022cde16bb76f95f205cc9711f405f4a0cd77a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/Docs/pulls/6852/commits","review_comments_url":"https://api.github.com/repos/aspnet/Docs/pulls/6852/comments","review_comment_url":"https://api.github.com/repos/aspnet/Docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/Docs/issues/6852/comments","statuses_url":"https://api.github.com/repos/aspnet/Docs/statuses/67ba79040d2a1dfca859a1dc6d8d42bec85b2bc7","head":{"label":"rachelappel:rachelap/signalr-config","ref":"rachelap/signalr-config","sha":"67ba79040d2a1dfca859a1dc6d8d42bec85b2bc7","user":{"login":"rachelappel","id":1857975,"node_id":"MDQ6VXNlcjE4NTc5NzU=","avatar_url":"https://avatars2.githubusercontent.com/u/1857975?v=4","gravatar_id":"","url":"https://api.github.com/users/rachelappel","html_url":"https://github.com/rachelappel","followers_url":"https://api.github.com/users/rachelappel/followers","following_url":"https://api.github.com/users/rachelappel/following{/other_user}","gists_url":"https://api.github.com/users/rachelappel/gists{/gist_id}","starred_url":"https://api.github.com/users/rachelappel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rachelappel/subscriptions","organizations_url":"https://api.github.com/users/rachelappel/orgs","repos_url":"https://api.github.com/users/rachelappel/repos","events_url":"https://api.github.com/users/rachelappel/events{/privacy}","received_events_url":"https://api.github.com/users/rachelappel/received_events","type":"User","site_admin":false},"repo":{"id":101670652,"node_id":"MDEwOlJlcG9zaXRvcnkxMDE2NzA2NTI=","name":"Docs","full_name":"rachelappel/Docs","owner":{"login":"rachelappel","id":1857975,"node_id":"MDQ6VXNlcjE4NTc5NzU=","avatar_url":"https://avatars2.githubusercontent.com/u/1857975?v=4","gravatar_id":"","url":"https://api.github.com/users/rachelappel","html_url":"https://github.com/rachelappel","followers_url":"https://api.github.com/users/rachelappel/followers","following_url":"https://api.github.com/users/rachelappel/following{/other_user}","gists_url":"https://api.github.com/users/rachelappel/gists{/gist_id}","starred_url":"https://api.github.com/users/rachelappel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rachelappel/subscriptions","organizations_url":"https://api.github.com/users/rachelappel/orgs","repos_url":"https://api.github.com/users/rachelappel/repos","events_url":"https://api.github.com/users/rachelappel/events{/privacy}","received_events_url":"https://api.github.com/users/rachelappel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rachelappel/Docs","description":"Documentation for ASP.NET and ASP.NET Core","fork":true,"url":"https://api.github.com/repos/rachelappel/Docs","forks_url":"https://api.github.com/repos/rachelappel/Docs/forks","keys_url":"https://api.github.com/repos/rachelappel/Docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rachelappel/Docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rachelappel/Docs/teams","hooks_url":"https://api.github.com/repos/rachelappel/Docs/hooks","issue_events_url":"https://api.github.com/repos/rachelappel/Docs/issues/events{/number}","events_url":"https://api.github.com/repos/rachelappel/Docs/events","assignees_url":"https://api.github.com/repos/rachelappel/Docs/assignees{/user}","branches_url":"https://api.github.com/repos/rachelappel/Docs/branches{/branch}","tags_url":"https://api.github.com/repos/rachelappel/Docs/tags","blobs_url":"https://api.github.com/repos/rachelappel/Docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rachelappel/Docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rachelappel/Docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/rachelappel/Docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rachelappel/Docs/statuses/{sha}","languages_url":"https://api.github.com/repos/rachelappel/Docs/languages","stargazers_url":"https://api.github.com/repos/rachelappel/Docs/stargazers","contributors_url":"https://api.github.com/repos/rachelappel/Docs/contributors","subscribers_url":"https://api.github.com/repos/rachelappel/Docs/subscribers","subscription_url":"https://api.github.com/repos/rachelappel/Docs/subscription","commits_url":"https://api.github.com/repos/rachelappel/Docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/rachelappel/Docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/rachelappel/Docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/rachelappel/Docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/rachelappel/Docs/contents/{+path}","compare_url":"https://api.github.com/repos/rachelappel/Docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rachelappel/Docs/merges","archive_url":"https://api.github.com/repos/rachelappel/Docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rachelappel/Docs/downloads","issues_url":"https://api.github.com/repos/rachelappel/Docs/issues{/number}","pulls_url":"https://api.github.com/repos/rachelappel/Docs/pulls{/number}","milestones_url":"https://api.github.com/repos/rachelappel/Docs/milestones{/number}","notifications_url":"https://api.github.com/repos/rachelappel/Docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rachelappel/Docs/labels{/name}","releases_url":"https://api.github.com/repos/rachelappel/Docs/releases{/id}","deployments_url":"https://api.github.com/repos/rachelappel/Docs/deployments","created_at":"2017-08-28T17:47:34Z","updated_at":"2018-05-10T11:47:41Z","pushed_at":"2018-06-07T14:47:34Z","git_url":"git://github.com/rachelappel/Docs.git","ssh_url":"git@github.com:rachelappel/Docs.git","clone_url":"https://github.com/rachelappel/Docs.git","svn_url":"https://github.com/rachelappel/Docs","homepage":"https://docs.microsoft.com/aspnet","size":622479,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"aspnet:master","ref":"master","sha":"b0ec440b25abc7db86851ded86368c4f0a169463","user":{"login":"aspnet","id":6476660,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzY2NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":28239455,"node_id":"MDEwOlJlcG9zaXRvcnkyODIzOTQ1NQ==","name":"Docs","full_name":"aspnet/Docs","owner":{"login":"aspnet","id":6476660,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY0NzY2NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/Docs","description":"Documentation for ASP.NET and ASP.NET Core","fork":false,"url":"https://api.github.com/repos/aspnet/Docs","forks_url":"https://api.github.com/repos/aspnet/Docs/forks","keys_url":"https://api.github.com/repos/aspnet/Docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Docs/teams","hooks_url":"https://api.github.com/repos/aspnet/Docs/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Docs/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Docs/events","assignees_url":"https://api.github.com/repos/aspnet/Docs/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Docs/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Docs/tags","blobs_url":"https://api.github.com/repos/aspnet/Docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Docs/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Docs/languages","stargazers_url":"https://api.github.com/repos/aspnet/Docs/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Docs/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Docs/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Docs/subscription","commits_url":"https://api.github.com/repos/aspnet/Docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/Docs/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Docs/merges","archive_url":"https://api.github.com/repos/aspnet/Docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Docs/downloads","issues_url":"https://api.github.com/repos/aspnet/Docs/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Docs/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Docs/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Docs/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Docs/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/Docs/deployments","created_at":"2014-12-19T17:38:02Z","updated_at":"2018-06-07T18:30:11Z","pushed_at":"2018-06-07T18:30:05Z","git_url":"git://github.com/aspnet/Docs.git","ssh_url":"git@github.com:aspnet/Docs.git","clone_url":"https://github.com/aspnet/Docs.git","svn_url":"https://github.com/aspnet/Docs","homepage":"https://docs.microsoft.com/aspnet","size":623204,"stargazers_count":2852,"watchers_count":2852,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7160,"mirror_url":null,"archived":false,"open_issues_count":358,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":7160,"open_issues":358,"watchers":2852,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/Docs/pulls/6852"},"html":{"href":"https://github.com/aspnet/Docs/pull/6852"},"issue":{"href":"https://api.github.com/repos/aspnet/Docs/issues/6852"},"comments":{"href":"https://api.github.com/repos/aspnet/Docs/issues/6852/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/Docs/pulls/6852/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/Docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/Docs/pulls/6852/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/Docs/statuses/67ba79040d2a1dfca859a1dc6d8d42bec85b2bc7"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"anurse"}}