From ceab68814496a1199bbce18917fcb289c7890f6b Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Tue, 13 Feb 2024 08:14:22 -0500 Subject: [PATCH] Update "ASP.NET Core" references (#31783) --- aspnetcore/blazor/call-web-api.md | 2 +- .../components/cascading-values-and-parameters.md | 2 +- aspnetcore/blazor/components/data-binding.md | 4 ++-- aspnetcore/blazor/file-uploads.md | 4 ++-- aspnetcore/blazor/forms/index.md | 2 +- aspnetcore/blazor/fundamentals/dependency-injection.md | 2 +- aspnetcore/blazor/fundamentals/signalr.md | 4 ++-- aspnetcore/blazor/globalization-localization.md | 2 +- aspnetcore/blazor/host-and-deploy/webassembly.md | 10 +++++----- aspnetcore/blazor/hybrid/tutorials/maui.md | 2 +- .../import-export-interop.md | 4 ++-- aspnetcore/blazor/javascript-interoperability/index.md | 2 +- aspnetcore/blazor/performance.md | 4 ++-- aspnetcore/blazor/progressive-web-app.md | 2 +- aspnetcore/blazor/project-structure.md | 2 +- .../security/includes/authentication-component.md | 2 +- .../blazor/security/includes/fetchdata-component.md | 4 ++-- .../security/includes/redirecttologin-component.md | 4 ++-- aspnetcore/blazor/security/includes/troubleshoot.md | 2 +- .../security/includes/usermanager-signinmanager.md | 2 +- aspnetcore/blazor/security/index.md | 2 +- .../blazor/security/server/additional-scenarios.md | 2 +- aspnetcore/blazor/security/server/index.md | 2 +- .../security/webassembly/additional-scenarios.md | 2 +- aspnetcore/blazor/security/webassembly/index.md | 4 ++-- aspnetcore/blazor/state-management.md | 4 ++-- aspnetcore/blazor/tutorials/signalr-blazor.md | 2 +- 27 files changed, 40 insertions(+), 40 deletions(-) diff --git a/aspnetcore/blazor/call-web-api.md b/aspnetcore/blazor/call-web-api.md index 71ea7fe4dc..df9e2b2306 100644 --- a/aspnetcore/blazor/call-web-api.md +++ b/aspnetcore/blazor/call-web-api.md @@ -18,7 +18,7 @@ This article describes how to call a web API from a Blazor app. [!INCLUDE[](~/blazor/includes/location-client-and-server-pre-net8.md)] > [!NOTE] -> The code examples in this article adopt [nullable reference types (NRTs) and .NET compiler null-state static analysis](xref:migration/50-to-60#nullable-reference-types-nrts-and-net-compiler-null-state-static-analysis), which are supported in ASP.NET Core 6.0 or later. When targeting ASP.NET Core 5.0 or earlier, remove the null type designation (`?`) from the `string?`, `TodoItem[]?`, `WeatherForecast[]?`, and `IEnumerable?` types in the article's examples. +> The code examples in this article adopt [nullable reference types (NRTs) and .NET compiler null-state static analysis](xref:migration/50-to-60#nullable-reference-types-nrts-and-net-compiler-null-state-static-analysis), which are supported in ASP.NET Core in .NET 6 or later. When targeting ASP.NET Core 5.0 or earlier, remove the null type designation (`?`) from the `string?`, `TodoItem[]?`, `WeatherForecast[]?`, and `IEnumerable?` types in the article's examples. :::zone pivot="webassembly" diff --git a/aspnetcore/blazor/components/cascading-values-and-parameters.md b/aspnetcore/blazor/components/cascading-values-and-parameters.md index 32dc6f3930..f600536c21 100644 --- a/aspnetcore/blazor/components/cascading-values-and-parameters.md +++ b/aspnetcore/blazor/components/cascading-values-and-parameters.md @@ -17,7 +17,7 @@ This article explains how to flow data from an ancestor Razor component to desce *Cascading values and parameters* provide a convenient way to flow data down a component hierarchy from an ancestor component to any number of descendent components. Unlike [Component parameters](xref:blazor/components/index#component-parameters), cascading values and parameters don't require an attribute assignment for each descendent component where the data is consumed. Cascading values and parameters also allow components to coordinate with each other across a component hierarchy. > [!NOTE] -> The code examples in this article adopt [nullable reference types (NRTs) and .NET compiler null-state static analysis](xref:migration/50-to-60#nullable-reference-types-nrts-and-net-compiler-null-state-static-analysis), which are supported in ASP.NET Core 6.0 or later. When targeting ASP.NET Core 5.0 or earlier, remove the null type designation (`?`) from the `CascadingType?`, `@ActiveTab?`, `RenderFragment?`, `ITab?`, `TabSet?`, and `string?` types in the article's examples. +> The code examples in this article adopt [nullable reference types (NRTs) and .NET compiler null-state static analysis](xref:migration/50-to-60#nullable-reference-types-nrts-and-net-compiler-null-state-static-analysis), which are supported in ASP.NET Core in .NET 6 or later. When targeting ASP.NET Core 5.0 or earlier, remove the null type designation (`?`) from the `CascadingType?`, `@ActiveTab?`, `RenderFragment?`, `ITab?`, `TabSet?`, and `string?` types in the article's examples. [!INCLUDE[](~/blazor/includes/location-client-and-server-pre-net8.md)] diff --git a/aspnetcore/blazor/components/data-binding.md b/aspnetcore/blazor/components/data-binding.md index 68c1f45ff1..9a625d1ac9 100644 --- a/aspnetcore/blazor/components/data-binding.md +++ b/aspnetcore/blazor/components/data-binding.md @@ -289,7 +289,7 @@ Two-way data binding isn't possible to implement with an event handler. Use `@bi The `OnInput` event handler updates the value of `inputValue` to `Long!` after a fourth character is provided. However, the user can continue adding characters to the element value in the UI. The value of `inputValue` isn't bound back to the element's value with each keystroke. The preceding example is only capable of one-way data binding. -The reason for this behavior is that Blazor isn't aware that your code intends to modify the value of `inputValue` in the event handler. Blazor doesn't try to force DOM element values and .NET variable values to match unless they're bound with `@bind` syntax. In earlier versions of Blazor, two-way data binding is implemented by [binding the element to a property and controlling the property's value with its setter](#binding-to-a-property-with-c-get-and-set-accessors). In ASP.NET Core 7.0 or later, `@bind:get`/`@bind:set` modifier syntax is used to implement two-way data binding, as the next example demonstrates. +The reason for this behavior is that Blazor isn't aware that your code intends to modify the value of `inputValue` in the event handler. Blazor doesn't try to force DOM element values and .NET variable values to match unless they're bound with `@bind` syntax. In earlier versions of Blazor, two-way data binding is implemented by [binding the element to a property and controlling the property's value with its setter](#binding-to-a-property-with-c-get-and-set-accessors). In ASP.NET Core in .NET 7 or later, `@bind:get`/`@bind:set` modifier syntax is used to implement two-way data binding, as the next example demonstrates. Consider the following ***correct approach*** using `@bind:get`/`@bind:set` for two-way data binding: @@ -364,7 +364,7 @@ Using `@bind:get`/`@bind:set` modifiers both controls the underlying value of `i :::moniker range="< aspnetcore-7.0" > [!NOTE] -> Two-way binding to a property with `get`/`set` accessors requires discarding the returned by . For two-way data binding in ASP.NET Core 7.0 or later, we recommend using `@bind:get`/`@bind:set` modifiers, which are described in 7.0 or later versions of this article. +> Two-way binding to a property with `get`/`set` accessors requires discarding the returned by . For two-way data binding in ASP.NET Core in .NET 7 or later, we recommend using `@bind:get`/`@bind:set` modifiers, which are described in 7.0 or later versions of this article. :::moniker-end diff --git a/aspnetcore/blazor/file-uploads.md b/aspnetcore/blazor/file-uploads.md index d5e933a9f4..d161bd37f8 100644 --- a/aspnetcore/blazor/file-uploads.md +++ b/aspnetcore/blazor/file-uploads.md @@ -308,7 +308,7 @@ The following controller in the web API project saves uploaded files from the cl :::moniker range="= aspnetcore-6.0" > [!NOTE] -> Binding form values with the [`[FromForm]` attribute](xref:Microsoft.AspNetCore.Mvc.FromFormAttribute) isn't natively supported for [Minimal APIs](xref:fundamentals/minimal-apis?view=aspnetcore-6.0#explicit-parameter-binding) in ASP.NET Core 6.0. Therefore, the following `Filesave` controller example can't be converted to use Minimal APIs. Support for binding from form values with Minimal APIs is available in ASP.NET Core 7.0 or later. +> Binding form values with the [`[FromForm]` attribute](xref:Microsoft.AspNetCore.Mvc.FromFormAttribute) isn't natively supported for [Minimal APIs](xref:fundamentals/minimal-apis?view=aspnetcore-6.0#explicit-parameter-binding) in ASP.NET Core in .NET 6. Therefore, the following `Filesave` controller example can't be converted to use Minimal APIs. Support for binding from form values with Minimal APIs is available in ASP.NET Core in .NET 7 or later. :::moniker-end @@ -520,7 +520,7 @@ The following controller in the server-side project saves uploaded files from th :::moniker range="< aspnetcore-6.0" > [!NOTE] -> Binding form values with the [`[FromForm]` attribute](xref:Microsoft.AspNetCore.Mvc.FromFormAttribute) isn't natively supported for [Minimal APIs](xref:fundamentals/minimal-apis?view=aspnetcore-6.0#explicit-parameter-binding) in ASP.NET Core 6.0. Therefore, the following `Filesave` controller example can't be converted to use Minimal APIs. Support for binding from form values with Minimal APIs is available in ASP.NET Core 7.0 or later. +> Binding form values with the [`[FromForm]` attribute](xref:Microsoft.AspNetCore.Mvc.FromFormAttribute) isn't natively supported for [Minimal APIs](xref:fundamentals/minimal-apis?view=aspnetcore-6.0#explicit-parameter-binding) in ASP.NET Core in .NET 6. Therefore, the following `Filesave` controller example can't be converted to use Minimal APIs. Support for binding from form values with Minimal APIs is available in ASP.NET Core in .NET 7 or later. :::moniker-end diff --git a/aspnetcore/blazor/forms/index.md b/aspnetcore/blazor/forms/index.md index fc4f1dd81d..79d84772db 100644 --- a/aspnetcore/blazor/forms/index.md +++ b/aspnetcore/blazor/forms/index.md @@ -310,7 +310,7 @@ Examples use the [target-typed `new` operator](/dotnet/csharp/language-reference public ShipDescription ShipDescription { get; set; } = new(); ``` -If using C# 8.0 or earlier (.NET 3.1), modify the example code to state the type to the `new` operator: +If using C# 8.0 or earlier (ASP.NET Core 3.1), modify the example code to state the type to the `new` operator: ```csharp public ShipDescription ShipDescription { get; set; } = new ShipDescription(); diff --git a/aspnetcore/blazor/fundamentals/dependency-injection.md b/aspnetcore/blazor/fundamentals/dependency-injection.md index ab8090390e..5b1c0e3882 100644 --- a/aspnetcore/blazor/fundamentals/dependency-injection.md +++ b/aspnetcore/blazor/fundamentals/dependency-injection.md @@ -543,7 +543,7 @@ For more information, see . [Circuit activity handlers](xref:blazor/fundamentals/signalr#monitor-server-side-circuit-activity) provide an approach for accessing scoped Blazor services from other non-Blazor dependency injection (DI) scopes, such as scopes created using . -Prior to the release of ASP.NET Core 8.0, accessing circuit-scoped services from other dependency injection scopes required using a custom base component type. With circuit activity handlers, a custom base component type isn't required, as the following example demonstrates: +Prior to the release of ASP.NET Core in .NET 8, accessing circuit-scoped services from other dependency injection scopes required using a custom base component type. With circuit activity handlers, a custom base component type isn't required, as the following example demonstrates: ```csharp public class CircuitServicesAccessor diff --git a/aspnetcore/blazor/fundamentals/signalr.md b/aspnetcore/blazor/fundamentals/signalr.md index e86356e772..bb2c68c09a 100644 --- a/aspnetcore/blazor/fundamentals/signalr.md +++ b/aspnetcore/blazor/fundamentals/signalr.md @@ -733,7 +733,7 @@ Blazor Web App: ``` -The following example for the `Pages/_Host.cshtml` file (Blazor Server, all versions except ASP.NET Core 6.0) or `Pages/_Layout.cshtml` file (Blazor Server, ASP.NET Core 6.0). +The following example for the `Pages/_Host.cshtml` file (Blazor Server, all versions except ASP.NET Core in .NET 6) or `Pages/_Layout.cshtml` file (Blazor Server, ASP.NET Core in .NET 6). Blazor Server: @@ -777,7 +777,7 @@ Configure the following values for the client: * `serverTimeoutInMilliseconds`: The server timeout in milliseconds. If this timeout elapses without receiving any messages from the server, the connection is terminated with an error. The default timeout value is 30 seconds. The server timeout should be at least double the value assigned to the Keep-Alive interval (`keepAliveIntervalInMilliseconds`). * `keepAliveIntervalInMilliseconds`: Default interval at which to ping the server. This setting allows the server to detect hard disconnects, such as when a client unplugs their computer from the network. The ping occurs at most as often as the server pings. If the server pings every five seconds, assigning a value lower than `5000` (5 seconds) pings every five seconds. The default value is 15 seconds. The Keep-Alive interval should be less than or equal to half the value assigned to the server timeout (`serverTimeoutInMilliseconds`). -The following example for the `Pages/_Host.cshtml` file (Blazor Server, all versions except ASP.NET Core 6.0) or `Pages/_Layout.cshtml` file (Blazor Server, ASP.NET Core 6.0): +The following example for the `Pages/_Host.cshtml` file (Blazor Server, all versions except ASP.NET Core in .NET 6) or `Pages/_Layout.cshtml` file (Blazor Server, ASP.NET Core in .NET 6): ```html diff --git a/aspnetcore/blazor/globalization-localization.md b/aspnetcore/blazor/globalization-localization.md index 4102ad2d8c..faf2b65f0a 100644 --- a/aspnetcore/blazor/globalization-localization.md +++ b/aspnetcore/blazor/globalization-localization.md @@ -44,7 +44,7 @@ In this article, *language* refers to selections made by a user in their browser *Culture* pertains to members of .NET and Blazor API. For example, a user's request can include the [`Accept-Language` header](https://developer.mozilla.org/docs/Web/HTTP/Headers/Accept-Language) specifying a *language* from the user's perspective, but the app ultimately sets the ("culture") property from the language that the user requested. API usually uses the word "culture" in its member names. > [!NOTE] -> The code examples in this article adopt [nullable reference types (NRTs) and .NET compiler null-state static analysis](xref:migration/50-to-60#nullable-reference-types-nrts-and-net-compiler-null-state-static-analysis), which are supported in ASP.NET Core 6.0 or later. When targeting ASP.NET Core 5.0 or earlier, remove the null type designation (`?`) from the article's examples. +> The code examples in this article adopt [nullable reference types (NRTs) and .NET compiler null-state static analysis](xref:migration/50-to-60#nullable-reference-types-nrts-and-net-compiler-null-state-static-analysis), which are supported in ASP.NET Core in .NET 6 or later. When targeting ASP.NET Core 5.0 or earlier, remove the null type designation (`?`) from the article's examples. ## Globalization diff --git a/aspnetcore/blazor/host-and-deploy/webassembly.md b/aspnetcore/blazor/host-and-deploy/webassembly.md index 0a43ccd34a..f7a4f2a121 100644 --- a/aspnetcore/blazor/host-and-deploy/webassembly.md +++ b/aspnetcore/blazor/host-and-deploy/webassembly.md @@ -985,7 +985,7 @@ Blazor performs Intermediate Language (IL) linking on each Release build to remo ## Change the file name extension of DLL files -*This section applies to ASP.NET Core 6.x and 7.x. In ASP.NET Core 8.0 or later, .NET assemblies are deployed as WebAssembly files (`.wasm`) using the Webcil file format. In ASP.NET Core 8.0 or later, this section only applies if the Webcil file format has been disabled in the app's project file.* +*This section applies to ASP.NET Core 6.x and 7.x. In ASP.NET Core in .NET 8 or later, .NET assemblies are deployed as WebAssembly files (`.wasm`) using the Webcil file format. In ASP.NET Core in .NET 8 or later, this section only applies if the Webcil file format has been disabled in the app's project file.* If a firewall, anti-virus program, or network security appliance is blocking the transmission of the app's dynamic-link library (DLL) files (`.dll`), you can follow the guidance in this section to change the file name extensions of the app's published DLL files. @@ -996,7 +996,7 @@ If a firewall, anti-virus program, or network security appliance is blocking the > [!NOTE] > Changing the file name extensions of the app's DLL files might not resolve the problem because many security systems scan the content of the app's files, not merely check file extensions. > -> For a more robust approach in environments that block the download and execution of DLL files, use ASP.NET Core 8.0 or later, which by default packages .NET assemblies as WebAssembly files (`.wasm`) using the [Webcil](https://github.com/dotnet/runtime/blob/main/docs/design/mono/webcil.md) file format. For more information, see the *Webcil packaging format for .NET assemblies* section in an 8.0 or later version of this article. +> For a more robust approach in environments that block the download and execution of DLL files, use ASP.NET Core in .NET 8 or later, which by default packages .NET assemblies as WebAssembly files (`.wasm`) using the [Webcil](https://github.com/dotnet/runtime/blob/main/docs/design/mono/webcil.md) file format. For more information, see the *Webcil packaging format for .NET assemblies* section in an 8.0 or later version of this article. > > Third-party approaches exist for dealing with this problem. For more information, see the resources at [Awesome Blazor](https://github.com/AdrienTorris/awesome-blazor). @@ -1009,8 +1009,8 @@ If a firewall, anti-virus program, or network security appliance is blocking the > > For a more robust approach in environments that block the download and execution of DLL files, take ***either*** of the following approaches: > -> * Use ASP.NET Core 8.0 or later, which by default packages .NET assemblies as WebAssembly files (`.wasm`) using the [Webcil](https://github.com/dotnet/runtime/blob/main/docs/design/mono/webcil.md) file format. For more information, see the *Webcil packaging format for .NET assemblies* section in an 8.0 or later version of this article. -> * In ASP.NET Core 6.0 or later, use a [custom deployment layout](xref:blazor/host-and-deploy/webassembly-deployment-layout). +> * Use ASP.NET Core in .NET 8 or later, which by default packages .NET assemblies as WebAssembly files (`.wasm`) using the [Webcil](https://github.com/dotnet/runtime/blob/main/docs/design/mono/webcil.md) file format. For more information, see the *Webcil packaging format for .NET assemblies* section in an 8.0 or later version of this article. +> * In ASP.NET Core in .NET 6 or later, use a [custom deployment layout](xref:blazor/host-and-deploy/webassembly-deployment-layout). > > Third-party approaches exist for dealing with this problem. For more information, see the resources at [Awesome Blazor](https://github.com/AdrienTorris/awesome-blazor). @@ -1070,7 +1070,7 @@ To address the compressed `blazor.boot.json.gz` and `blazor.boot.json.br` files, The preceding guidance for the compressed `blazor.boot.json` file also applies when service worker assets are in use. Remove or recompress `service-worker-assets.js.br` and `service-worker-assets.js.gz`. Otherwise, file integrity checks fail in the browser. -The following Windows example for .NET 6.0 uses a PowerShell script placed at the root of the project. The following script, which disables compression, is the basis for further modification if you wish to recompress the `blazor.boot.json` file. +The following Windows example for .NET 6 uses a PowerShell script placed at the root of the project. The following script, which disables compression, is the basis for further modification if you wish to recompress the `blazor.boot.json` file. `ChangeDLLExtensions.ps1:`: diff --git a/aspnetcore/blazor/hybrid/tutorials/maui.md b/aspnetcore/blazor/hybrid/tutorials/maui.md index 0dc15792c2..9367a84935 100644 --- a/aspnetcore/blazor/hybrid/tutorials/maui.md +++ b/aspnetcore/blazor/hybrid/tutorials/maui.md @@ -46,7 +46,7 @@ Select the **.NET MAUI Blazor Hybrid App** template and then select the **Next** :::image type="content" source="maui/_static/win/new-project-2.png" alt-text="Choose a template."::: > [!NOTE] -> In .NET 7.0 or earlier, the template is named **.NET MAUI Blazor App**. +> In .NET 7 or earlier, the template is named **.NET MAUI Blazor App**. In the **Configure your new project** dialog: diff --git a/aspnetcore/blazor/javascript-interoperability/import-export-interop.md b/aspnetcore/blazor/javascript-interoperability/import-export-interop.md index 9a89284fef..98cfccc0e9 100644 --- a/aspnetcore/blazor/javascript-interoperability/import-export-interop.md +++ b/aspnetcore/blazor/javascript-interoperability/import-export-interop.md @@ -28,11 +28,11 @@ This article describes an alternative JS interop approach specific to client-sid ## Obsolete JavaScript interop API -Unmarshalled JS interop using API is obsolete in ASP.NET Core 7.0 or later. Follow the guidance in this article to replace the obsolete API. +Unmarshalled JS interop using API is obsolete in ASP.NET Core in .NET 7 or later. Follow the guidance in this article to replace the obsolete API. ## Prerequisites -[Download and install .NET 7.0 or later](https://dotnet.microsoft.com/download/dotnet) if it isn't already installed on the system or if the system doesn't have the latest version installed. +[Download and install .NET 7 or later](https://dotnet.microsoft.com/download/dotnet) if it isn't already installed on the system or if the system doesn't have the latest version installed. ## Namespace diff --git a/aspnetcore/blazor/javascript-interoperability/index.md b/aspnetcore/blazor/javascript-interoperability/index.md index c416118f4c..17e2803fa1 100644 --- a/aspnetcore/blazor/javascript-interoperability/index.md +++ b/aspnetcore/blazor/javascript-interoperability/index.md @@ -22,7 +22,7 @@ Further JS interop guidance is provided in the following articles: :::moniker range=">= aspnetcore-7.0" > [!NOTE] -> JavaScript `[JSImport]`/`[JSExport]` interop API is available for client-side components in ASP.NET Core 7.0 or later. +> JavaScript `[JSImport]`/`[JSExport]` interop API is available for client-side components in ASP.NET Core in .NET 7 or later. > > For more information, see . diff --git a/aspnetcore/blazor/performance.md b/aspnetcore/blazor/performance.md index f3a54dfbe5..2e9c77b42c 100644 --- a/aspnetcore/blazor/performance.md +++ b/aspnetcore/blazor/performance.md @@ -15,7 +15,7 @@ uid: blazor/performance Blazor is optimized for high performance in most realistic application UI scenarios. However, the best performance depends on developers adopting the correct patterns and features. > [!NOTE] -> The code examples in this article adopt [nullable reference types (NRTs) and .NET compiler null-state static analysis](xref:migration/50-to-60#nullable-reference-types-nrts-and-net-compiler-null-state-static-analysis), which are supported in ASP.NET Core 6.0 or later. +> The code examples in this article adopt [nullable reference types (NRTs) and .NET compiler null-state static analysis](xref:migration/50-to-60#nullable-reference-types-nrts-and-net-compiler-null-state-static-analysis), which are supported in ASP.NET Core in .NET 6 or later. [!INCLUDE[](~/blazor/includes/location-client-and-server-pre-net8.md)] @@ -736,7 +736,7 @@ function jsInteropCall() { ### Use JavaScript `[JSImport]`/`[JSExport]` interop -JavaScript `[JSImport]`/`[JSExport]` interop for Blazor WebAssembly apps offers improved performance and stability over the JS interop API in framework releases prior to ASP.NET Core 7.0. +JavaScript `[JSImport]`/`[JSExport]` interop for Blazor WebAssembly apps offers improved performance and stability over the JS interop API in framework releases prior to ASP.NET Core in .NET 7. For more information, see . diff --git a/aspnetcore/blazor/progressive-web-app.md b/aspnetcore/blazor/progressive-web-app.md index 5ac4348dfa..3aca7f411b 100644 --- a/aspnetcore/blazor/progressive-web-app.md +++ b/aspnetcore/blazor/progressive-web-app.md @@ -300,7 +300,7 @@ By default, this manifest lists: * Any Blazor-managed resources, such as .NET assemblies and the .NET WebAssembly runtime files required to function offline. * All resources for publishing to the app's `wwwroot` directory, such as images, stylesheets, and JavaScript files, including static web assets supplied by external projects and NuGet packages. -You can control which of these resources are fetched and cached by the service worker by editing the logic in `onInstall` in `service-worker.published.js`. By default, the service worker fetches and caches files matching typical web file name extensions such as `.html`, `.css`, `.js`, and `.wasm`, plus file types specific to Blazor WebAssembly, such as `.pdb` files (all versions) and `.dll` files (ASP.NET Core 7.0 or earlier). +You can control which of these resources are fetched and cached by the service worker by editing the logic in `onInstall` in `service-worker.published.js`. By default, the service worker fetches and caches files matching typical web file name extensions such as `.html`, `.css`, `.js`, and `.wasm`, plus file types specific to Blazor WebAssembly, such as `.pdb` files (all versions) and `.dll` files (ASP.NET Core in .NET 7 or earlier). To include additional resources that aren't present in the app's `wwwroot` directory, define extra MSBuild `ItemGroup` entries, as shown in the following example: diff --git a/aspnetcore/blazor/project-structure.md b/aspnetcore/blazor/project-structure.md index 8aa9770d56..aa2ccdb6bb 100644 --- a/aspnetcore/blazor/project-structure.md +++ b/aspnetcore/blazor/project-structure.md @@ -350,7 +350,7 @@ Project structure: * `MainLayout.razor.css`: Stylesheet for the app's main layout. * `NavMenu` component (`NavMenu.razor`): Implements sidebar navigation. Includes the [`NavLink` component](xref:blazor/fundamentals/routing#navlink-component) (), which renders navigation links to other Razor components. The component automatically indicates a selected state when its component is loaded, which helps the user understand which component is currently displayed. * `NavMenu.razor.css`: Stylesheet for the app's navigation menu. - * `SurveyPrompt` component (`SurveyPrompt.razor`) (*ASP.NET Core 7.0 or earlier*): Blazor survey component. + * `SurveyPrompt` component (`SurveyPrompt.razor`) (*ASP.NET Core in .NET 7 or earlier*): Blazor survey component. * `wwwroot` folder: The [Web Root](xref:fundamentals/index#web-root) folder for the app containing the app's public static assets, including `appsettings.json` and environmental app settings files for [configuration settings](xref:blazor/fundamentals/configuration). The `index.html` webpage is the root page of the app implemented as an HTML page: * When any page of the app is initially requested, this page is rendered and returned in the response. diff --git a/aspnetcore/blazor/security/includes/authentication-component.md b/aspnetcore/blazor/security/includes/authentication-component.md index 89422e4a75..b7a4bfb170 100644 --- a/aspnetcore/blazor/security/includes/authentication-component.md +++ b/aspnetcore/blazor/security/includes/authentication-component.md @@ -18,4 +18,4 @@ The [!NOTE] -> [Nullable reference types (NRTs) and .NET compiler null-state static analysis](xref:migration/50-to-60#nullable-reference-types-nrts-and-net-compiler-null-state-static-analysis) is supported in ASP.NET Core 6.0 or later. Prior to the release of ASP.NET Core 6.0, the `string` type appears without the null type designation (`?`). +> [Nullable reference types (NRTs) and .NET compiler null-state static analysis](xref:migration/50-to-60#nullable-reference-types-nrts-and-net-compiler-null-state-static-analysis) is supported in ASP.NET Core in .NET 6 or later. Prior to the release of ASP.NET Core in .NET 6, the `string` type appears without the null type designation (`?`). diff --git a/aspnetcore/blazor/security/includes/fetchdata-component.md b/aspnetcore/blazor/security/includes/fetchdata-component.md index c952122887..ec2b3e958c 100644 --- a/aspnetcore/blazor/security/includes/fetchdata-component.md +++ b/aspnetcore/blazor/security/includes/fetchdata-component.md @@ -13,8 +13,8 @@ If the request was successful, the token variable is populated with the access t If the request failed because the token couldn't be provisioned without user interaction: -* ASP.NET Core 7.0 or later: The app navigates to `AccessTokenResult.InteractiveRequestUrl` using the given `AccessTokenResult.InteractionOptions` to allow refreshing the access token. -* ASP.NET Core 6.0 or earlier: The token result contains a redirect URL. Navigating to this URL takes the user to the login page and back to the current page after a successful authentication. +* ASP.NET Core in .NET 7 or later: The app navigates to `AccessTokenResult.InteractiveRequestUrl` using the given `AccessTokenResult.InteractionOptions` to allow refreshing the access token. +* ASP.NET Core in .NET 6 or earlier: The token result contains a redirect URL. Navigating to this URL takes the user to the login page and back to the current page after a successful authentication. ```razor @page "/fetchdata" diff --git a/aspnetcore/blazor/security/includes/redirecttologin-component.md b/aspnetcore/blazor/security/includes/redirecttologin-component.md index 89897c0e0c..484d24f206 100644 --- a/aspnetcore/blazor/security/includes/redirecttologin-component.md +++ b/aspnetcore/blazor/security/includes/redirecttologin-component.md @@ -2,8 +2,8 @@ The `RedirectToLogin` component (`Shared/RedirectToLogin.razor`): * Manages redirecting unauthorized users to the login page. * The current URL that the user is attempting to access is maintained by so that they can be returned to that page if authentication is successful using: - * [Navigation history state](xref:blazor/fundamentals/routing#navigation-history-state) in ASP.NET Core 7.0 or later. - * A query string in ASP.NET Core 6.0 or earlier. + * [Navigation history state](xref:blazor/fundamentals/routing#navigation-history-state) in ASP.NET Core in .NET 7 or later. + * A query string in ASP.NET Core in .NET 6 or earlier. Inspect the `RedirectToLogin` component in [reference source](https://github.com/dotnet/aspnetcore/blob/release/7.0/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Client/Shared/RedirectToLogin.razor). diff --git a/aspnetcore/blazor/security/includes/troubleshoot.md b/aspnetcore/blazor/security/includes/troubleshoot.md index e8422aaea2..cc49bb7729 100644 --- a/aspnetcore/blazor/security/includes/troubleshoot.md +++ b/aspnetcore/blazor/security/includes/troubleshoot.md @@ -1,6 +1,6 @@ ### Logging -*This section applies to ASP.NET Core 7.0 or later.* +*This section applies to ASP.NET Core in .NET 7 or later.* To enable debug or trace logging for Blazor WebAssembly authentication, see . diff --git a/aspnetcore/blazor/security/includes/usermanager-signinmanager.md b/aspnetcore/blazor/security/includes/usermanager-signinmanager.md index 4b78c83b5e..31c5f9ebb7 100644 --- a/aspnetcore/blazor/security/includes/usermanager-signinmanager.md +++ b/aspnetcore/blazor/security/includes/usermanager-signinmanager.md @@ -5,7 +5,7 @@ Set the user identifier claim type when a Server app requires: * or in an API endpoint. * details, such as the user's name, email address, or lockout end time. -In `Program.cs` for ASP.NET Core 6.0 or later: +In `Program.cs` for ASP.NET Core in .NET 6 or later: ```csharp using System.Security.Claims; diff --git a/aspnetcore/blazor/security/index.md b/aspnetcore/blazor/security/index.md index 14ca048d0d..68f11c8726 100644 --- a/aspnetcore/blazor/security/index.md +++ b/aspnetcore/blazor/security/index.md @@ -44,7 +44,7 @@ ASP.NET Core abstractions, such as [!NOTE] -> The code examples in this article adopt [nullable reference types (NRTs) and .NET compiler null-state static analysis](xref:migration/50-to-60#nullable-reference-types-nrts-and-net-compiler-null-state-static-analysis), which are supported in ASP.NET Core 6.0 or later. When targeting ASP.NET Core 5.0 or earlier, remove the null type designation (`?`) from examples in this article. +> The code examples in this article adopt [nullable reference types (NRTs) and .NET compiler null-state static analysis](xref:migration/50-to-60#nullable-reference-types-nrts-and-net-compiler-null-state-static-analysis), which are supported in ASP.NET Core in .NET 6 or later. When targeting ASP.NET Core 5.0 or earlier, remove the null type designation (`?`) from examples in this article. :::moniker range=">= aspnetcore-8.0" diff --git a/aspnetcore/blazor/security/server/additional-scenarios.md b/aspnetcore/blazor/security/server/additional-scenarios.md index 938734258e..29dff97b02 100644 --- a/aspnetcore/blazor/security/server/additional-scenarios.md +++ b/aspnetcore/blazor/security/server/additional-scenarios.md @@ -17,7 +17,7 @@ This article explains how to configure server-side Blazor for additional securit [!INCLUDE[](~/blazor/includes/location-client-and-server-pre-net8.md)] > [!NOTE] -> The code examples in this article adopt [nullable reference types (NRTs) and .NET compiler null-state static analysis](xref:migration/50-to-60#nullable-reference-types-nrts-and-net-compiler-null-state-static-analysis), which are supported in ASP.NET Core 6.0 or later. When targeting ASP.NET Core 5.0 or earlier, remove the null type designation (`?`) from the `string?`, `TodoItem[]?`, `WeatherForecast[]?`, and `IEnumerable?` types in the article's examples. +> The code examples in this article adopt [nullable reference types (NRTs) and .NET compiler null-state static analysis](xref:migration/50-to-60#nullable-reference-types-nrts-and-net-compiler-null-state-static-analysis), which are supported in ASP.NET Core in .NET 6 or later. When targeting ASP.NET Core 5.0 or earlier, remove the null type designation (`?`) from the `string?`, `TodoItem[]?`, `WeatherForecast[]?`, and `IEnumerable?` types in the article's examples. ## Pass tokens to a server-side Blazor app diff --git a/aspnetcore/blazor/security/server/index.md b/aspnetcore/blazor/security/server/index.md index bbb3e7905c..694580401c 100644 --- a/aspnetcore/blazor/security/server/index.md +++ b/aspnetcore/blazor/security/server/index.md @@ -28,7 +28,7 @@ Blazor differs from a traditional server-rendered web apps that make new HTTP re > Implementing a custom `NavigationManager` to achieve authentication validation during navigation isn't recommended. If the app must execute custom authentication state logic during navigation, use a [custom `AuthenticationStateProvider`](#implement-a-custom-authenticationstateprovider). > [!NOTE] -> The code examples in this article adopt [nullable reference types (NRTs) and .NET compiler null-state static analysis](xref:migration/50-to-60#nullable-reference-types-nrts-and-net-compiler-null-state-static-analysis), which are supported in ASP.NET Core 6.0 or later. When targeting ASP.NET Core 5.0 or earlier, remove the null type designation (`?`) from the examples in this article. +> The code examples in this article adopt [nullable reference types (NRTs) and .NET compiler null-state static analysis](xref:migration/50-to-60#nullable-reference-types-nrts-and-net-compiler-null-state-static-analysis), which are supported in ASP.NET Core in .NET 6 or later. When targeting ASP.NET Core 5.0 or earlier, remove the null type designation (`?`) from the examples in this article. ## Project template diff --git a/aspnetcore/blazor/security/webassembly/additional-scenarios.md b/aspnetcore/blazor/security/webassembly/additional-scenarios.md index 5fcff1e1d1..d9aa94d7e0 100644 --- a/aspnetcore/blazor/security/webassembly/additional-scenarios.md +++ b/aspnetcore/blazor/security/webassembly/additional-scenarios.md @@ -1600,7 +1600,7 @@ The following subsections explain how to replace: Create a JavaScript library to handle your custom authentication details. > [!WARNING] -> The guidance in this section is an implementation detail of the default . The TypeScript code in this section applies specifically to ASP.NET Core 7.0 and is subject to change without notice in upcoming releases of ASP.NET Core. +> The guidance in this section is an implementation detail of the default . The TypeScript code in this section applies specifically to ASP.NET Core in .NET 7 and is subject to change without notice in upcoming releases of ASP.NET Core. ```typescript // .NET makes calls to an AuthenticationService object in the Window. diff --git a/aspnetcore/blazor/security/webassembly/index.md b/aspnetcore/blazor/security/webassembly/index.md index 5a53d39a41..4cc0402631 100644 --- a/aspnetcore/blazor/security/webassembly/index.md +++ b/aspnetcore/blazor/security/webassembly/index.md @@ -181,7 +181,7 @@ When these scenarios are implemented in documentation examples, ***two*** identi Although refresh tokens can't be secured in Blazor WebAssembly apps, they can be used if you implement them with appropriate security strategies. -For standalone Blazor WebAssembly apps in ASP.NET Core 6.0 or later, we recommend using: +For standalone Blazor WebAssembly apps in ASP.NET Core in .NET 6 or later, we recommend using: * The [OAuth 2.0 Authorization Code flow (Code) with Proof Key for Code Exchange (PKCE)](https://oauth.net/2/pkce/). * A refresh token that has a short expiration. @@ -279,7 +279,7 @@ For more information, see article. diff --git a/aspnetcore/blazor/state-management.md b/aspnetcore/blazor/state-management.md index fb655eeaec..112b85843e 100644 --- a/aspnetcore/blazor/state-management.md +++ b/aspnetcore/blazor/state-management.md @@ -16,7 +16,7 @@ zone_pivot_groups: blazor-app-models This article describes common approaches for maintaining a user's data (state) while they use an app and across browser sessions. > [!NOTE] -> The code examples in this article adopt [nullable reference types (NRTs) and .NET compiler null-state static analysis](xref:migration/50-to-60#nullable-reference-types-nrts-and-net-compiler-null-state-static-analysis), which are supported in ASP.NET Core 6.0 or later. When targeting ASP.NET Core 5.0 or earlier, remove the null type designation (`?`) from types in the article's examples. +> The code examples in this article adopt [nullable reference types (NRTs) and .NET compiler null-state static analysis](xref:migration/50-to-60#nullable-reference-types-nrts-and-net-compiler-null-state-static-analysis), which are supported in ASP.NET Core in .NET 6 or later. When targeting ASP.NET Core 5.0 or earlier, remove the null type designation (`?`) from types in the article's examples. [!INCLUDE[](~/blazor/includes/location-client-and-server-pre-net8.md)] @@ -697,7 +697,7 @@ Client-side apps (`Program` file): builder.Services.AddSingleton(); ``` -Server-side apps (`Program` file, ASP.NET Core 6.0 or later): +Server-side apps (`Program` file, ASP.NET Core in .NET 6 or later): ```csharp builder.Services.AddScoped(); diff --git a/aspnetcore/blazor/tutorials/signalr-blazor.md b/aspnetcore/blazor/tutorials/signalr-blazor.md index 2f03b10d46..0f069b0f28 100644 --- a/aspnetcore/blazor/tutorials/signalr-blazor.md +++ b/aspnetcore/blazor/tutorials/signalr-blazor.md @@ -72,7 +72,7 @@ Select the **Blazor Web App** template. Select **Next**. Type `BlazorSignalRApp` in the **Project name** field. Confirm the **Location** entry is correct or provide a location for the project. Select **Next**. -Confirm the **Framework** is .NET 8.0 or later. Select **Create**. +Confirm the **Framework** is .NET 8 or later. Select **Create**. # [Visual Studio Code](#tab/visual-studio-code)