diff --git a/.openpublishing.redirection.json b/.openpublishing.redirection.json index 54686b001a9b3..f79cba4836cb7 100644 --- a/.openpublishing.redirection.json +++ b/.openpublishing.redirection.json @@ -246,6 +246,10 @@ "redirect_url": "/dotnet/core/compatibility/5.0", "redirect_document_id": true }, + { + "source_path": "docs/core/compatibility/aspnet-core/6.0/blazor-long-polling-fallback.md", + "redirect_url": "/dotnet/core/compatibility/6.0" + }, { "source_path": "docs/core/compatibility/code-analysis.md", "redirect_url": "/dotnet/core/compatibility/code-analysis/5.0/ca1416-platform-compatibility-analyzer" diff --git a/docs/core/compatibility/6.0.md b/docs/core/compatibility/6.0.md index 81a12583ffceb..dbfd178f62d4d 100644 --- a/docs/core/compatibility/6.0.md +++ b/docs/core/compatibility/6.0.md @@ -21,7 +21,6 @@ If you're migrating an app to .NET 6, the breaking changes listed here might aff | [Blazor: Parameter name changed in RequestImageFileAsync method](aspnet-core/6.0/blazor-parameter-name-changed-in-method.md) | ✔️ | ❌ | Preview 1 | | [Blazor: WebEventDescriptor.EventArgsType property replaced](aspnet-core/6.0/blazor-eventargstype-property-replaced.md) | ❌ | ❌ | | | [Blazor: Byte array interop](aspnet-core/6.0/byte-array-interop.md) | ✔️ | ❌ | Preview 6 | -| [Blazor server: Disable long polling fallback transport](aspnet-core/6.0/blazor-long-polling-fallback.md) | ✔️ | ❌ | RC 1 | | [Changed MessagePack library in @microsoft/signalr-protocol-msgpack](aspnet-core/6.0/messagepack-library-change.md) | ❌ | ✔️ | | | [ClientCertificate property doesn't trigger renegotiation for HttpSys](aspnet-core/6.0/clientcertificate-doesnt-trigger-renegotiation.md) | ✔️ | ❌ | | | [Kestrel: Log message attributes changed](aspnet-core/6.0/kestrel-log-message-attributes-changed.md) | ✔️ | ❌ | | diff --git a/docs/core/compatibility/aspnet-core/6.0/blazor-long-polling-fallback.md b/docs/core/compatibility/aspnet-core/6.0/blazor-long-polling-fallback.md deleted file mode 100644 index ada0233752175..0000000000000 --- a/docs/core/compatibility/aspnet-core/6.0/blazor-long-polling-fallback.md +++ /dev/null @@ -1,74 +0,0 @@ ---- -title: "Breaking change: Blazor server: Disable LongPolling fallback transport" -description: "Learn about the breaking change in ASP.NET Core 6.0 where LongPolling is not used as a fallback transport when WebSockets aren't available." -ms.date: 08/12/2021 -no-loc: [ Blazor, WebSocket, LongPolling ] ---- -# Blazor server: Disable long polling fallback transport - -> [!NOTE] -> This breaking change will be reverted in ASP.NET Core 6.0 RC 2. - -Prior to .NET 6, *LongPolling* was a fallback transport utilized when WebSockets weren't available. The LongPolling fallback can lead to a degraded user experience, so it has been removed. Both the client and server now support only WebSockets by default. - -## Version introduced - -ASP.NET Core 6.0 RC 1 - -## Old behavior - -If WebSockets are unavailable for a circuit (for example, due to network issues or browser incompatibility), LongPolling is used instead. - -## New behavior - -The following table shows the error message you'll receive for each combination of client and server configurations. - -| Client | Server | Message | -|---|---|---| -| WS (without browser WS support) | WebSockets | `Unable to connect, please ensure you are using an updated browser that supports WebSockets.` | -| WS (with WS connection being rejected) | WebSockets | `Unable to connect, please ensure WebSockets are available. A VPN or proxy may be blocking the connection.` | -| WS | LongPolling | `An unhandled error has occurred.` Console Error: `Unable to initiate a SignalR connection to the server. This might be because the server is not configured to support WebSockets. To troubleshoot this, visit https://aka.ms/blazor-server-websockets-error.` | -| LongPolling | WebSockets | `An unhandled error has occurred.` | - -## Reason for change - -This change was made to improve the overall end-user experience by enforcing WebSocket use. - -## Recommended action - -Ensure WebSockets are functioning as expected with your application. If you must use LongPolling, you can enable it by making the following client and server side changes. - -### Server side - -In `Startup.cs`, replace `endpoints.MapBlazorHub()` with: - -```c# -endpoints.MapBlazorHub(configureOptions: options => -{ - options.Transports = HttpTransportType.WebSockets | HttpTransportType.LongPolling; -}); -``` - -### Client side - -In `Pages/_Layout.cshtml`, update the `blazor.server.js` script tag to include the `autostart="false"` attribute: - -```html - -``` - -Below the `blazor.server.js` script tag, add the following snippet. The supported fields are (`1`) and (`4`). - -```html - -``` - -## Affected APIs - -None. diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index c0569f3aea668..2ebf81293f2cc 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -35,8 +35,6 @@ items: href: aspnet-core/6.0/blazor-eventargstype-property-replaced.md - name: "Blazor: Byte-array interop" href: aspnet-core/6.0/byte-array-interop.md - - name: "Blazor server: Disable long-polling fallback" - href: aspnet-core/6.0/blazor-long-polling-fallback.md - name: ClientCertificate doesn't trigger renegotiation href: aspnet-core/6.0/clientcertificate-doesnt-trigger-renegotiation.md - name: "Kestrel: Log message attributes changed" @@ -463,8 +461,6 @@ items: href: aspnet-core/6.0/blazor-eventargstype-property-replaced.md - name: "Blazor: Byte-array interop" href: aspnet-core/6.0/byte-array-interop.md - - name: "Blazor server: Disable long-polling fallback" - href: aspnet-core/6.0/blazor-long-polling-fallback.md - name: ClientCertificate doesn't trigger renegotiation href: aspnet-core/6.0/clientcertificate-doesnt-trigger-renegotiation.md - name: "Kestrel: Log message attributes changed" diff --git a/docs/whats-new/dotnet-docs-2021-08-01.md b/docs/whats-new/dotnet-docs-2021-08-01.md index 9418fbc207f59..f32a92c62d499 100644 --- a/docs/whats-new/dotnet-docs-2021-08-01.md +++ b/docs/whats-new/dotnet-docs-2021-08-01.md @@ -24,7 +24,6 @@ Welcome to what's new in the .NET docs from August 1, 2021 through August 31, 20 - [OutputType not changed from Exe to WinExe for Windows Forms and WPF projects](../core/compatibility/sdk/6.0/outputtype-not-set-automatically.md) - [CA2018: The `count` argument to `Buffer.BlockCopy` should specify the number of bytes to copy](../fundamentals/code-analysis/quality-rules/ca2018.md) - [dotnet workload restore](../core/tools/dotnet-workload-restore.md) -- [Blazor server: Disable long polling fallback transport](../core/compatibility/aspnet-core/6.0/blazor-long-polling-fallback.md) - [JsonNode no longer supports C# `dynamic` type](../core/compatibility/serialization/6.0/jsonnode-dynamic-type.md) - [Localization in .NET](../core/extensions/localization.md) - [Perform culture-insensitive case changes](../core/extensions/performing-culture-insensitive-case-changes.md)