From 2e8a40b89626baf3fd427517d4c964ec86fe983f Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Wed, 26 Mar 2025 08:51:36 -0400 Subject: [PATCH 1/5] Update Blazor issue messages (#35053) --- .github/workflows/blazor-hybrid-issue-processing.yml | 2 +- .github/workflows/blazor-issue-processing.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/blazor-hybrid-issue-processing.yml b/.github/workflows/blazor-hybrid-issue-processing.yml index abde5265ea68..144ac011002c 100644 --- a/.github/workflows/blazor-hybrid-issue-processing.yml +++ b/.github/workflows/blazor-hybrid-issue-processing.yml @@ -17,7 +17,7 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: `### 🌱🐇 **_Spring is coming. Hang in there! I'm pull'in for ya!_** 🐣🌻 + body: `### 🌱🐇 **_Spring is here!!_** 🐣🌻 A green dinosaur 🦖 will be along shortly to assist. *Stand-by ........*` }) diff --git a/.github/workflows/blazor-issue-processing.yml b/.github/workflows/blazor-issue-processing.yml index 3ed4e84318e0..f8045d46ff8e 100644 --- a/.github/workflows/blazor-issue-processing.yml +++ b/.github/workflows/blazor-issue-processing.yml @@ -22,7 +22,7 @@ jobs: issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - body: `### 🌱🐇 **_Spring is coming. Hang in there! I'm pull'in for ya!_** 🐣🌻 + body: `### 🌱🐇 **_Spring is here!!_** 🐣🌻 *Stand-by!* ... A green dinosaur 🦖 will be along shortly to assist.` }) From b5d672f445fbf2fc84f91473250dee7176600e2f Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Wed, 26 Mar 2025 10:43:24 -0400 Subject: [PATCH 2/5] Peg SHA hash for GH Pages deployment (#35055) --- .../host-and-deploy/index/copy-button.svg | 4 ++++ .../blazor/host-and-deploy/webassembly.md | 17 +++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 aspnetcore/blazor/host-and-deploy/index/copy-button.svg diff --git a/aspnetcore/blazor/host-and-deploy/index/copy-button.svg b/aspnetcore/blazor/host-and-deploy/index/copy-button.svg new file mode 100644 index 000000000000..c7039bd9af10 --- /dev/null +++ b/aspnetcore/blazor/host-and-deploy/index/copy-button.svg @@ -0,0 +1,4 @@ + diff --git a/aspnetcore/blazor/host-and-deploy/webassembly.md b/aspnetcore/blazor/host-and-deploy/webassembly.md index 6e908687c8cf..1727bdbafe05 100644 --- a/aspnetcore/blazor/host-and-deploy/webassembly.md +++ b/aspnetcore/blazor/host-and-deploy/webassembly.md @@ -681,13 +681,26 @@ The following guidance for GitHub Pages deployments of Blazor WebAssembly apps d * **Actions permissions** * **Allow enterprise actions, and select non-enterprise, actions and reusable workflows** > Enabled (selected) * **Allow actions created by GitHub** > Enabled (selected) - * **Allow actions and reusable workflows** > `stevesandersonms/ghaction-rewrite-base-href@v1,` + * **Allow actions and reusable workflows** > `stevesandersonms/ghaction-rewrite-base-href@{SHA HASH},`† * **Workflow permissions** > **Read repository contents and packages permissions** * **Pages** > **Build and deployment** * **Source** > **GitHub Actions** * Selected workflow: **Static HTML** and base your static deployment Action script on the [Xref Generator `static.yml` file](https://github.com/dotnet/blazor-samples/blob/main/.github/workflows/static.yml) for the Xref Generator tool. The configuration in the file is described in the next section. * **Custom domain**: Set if you intend to use a custom domain, which isn't covered by this guidance. For more information, see [Configuring a custom domain for your GitHub Pages site](https://docs.github.com/pages/configuring-a-custom-domain-for-your-github-pages-site). * **Enforce HTTPS** > Enabled (selected) + +†The SHA hash (`{SHA HASH}` placeholder) represents the SHA hash for the latest `stevesandersonms/ghaction-rewrite-base-href` GitHub Action release version. By pinning to a specific version, there's less risk that a compromised latest release using a version moniker, such as `v1`, can jeopardize the deployment. Periodically, update the SHA to the latest release for the latest features and bug fixes. + +To obtain the SHA hash: + +1. Navigate to the [`SteveSandersonMS/ghaction-rewrite-base-href` Action GitHub repository](https://github.com/SteveSandersonMS/ghaction-rewrite-base-href). +1. Select the release on the right-side of the page under **Releases**. +1. Locate and select the short SHA hash (for example, `5b54862`). +1. Either: + * Take the full SHA from the URL in the browser's address bar. + * Select the copy button on the right side of page ![Copy button](~/blazor/host-and-deploy/index/copy-button.svg) to put the SHA on your clipboard. + +For more information, see [Using pre-written building blocks in your workflow: Using SHAs (GitHub documentation)](https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/using-pre-written-building-blocks-in-your-workflow#using-shas). ### Static deployment script configuration @@ -699,7 +712,7 @@ Configure the following entries in the script for your deployment: * Push path (`on:push:paths`): Set the push path to match the app's repo folder with a `**` wildcard. Example: `BlazorWebAssemblyXrefGenerator/**` * .NET SDK version (`dotnet-version` via the [`actions/setup-dotnet` Action](https://github.com/actions/setup-dotnet)): Currently, there's no way to set the version to "latest" (see [Allow specifying 'latest' as dotnet-version (`actions/setup-dotnet` #497)](https://github.com/actions/setup-dotnet/issues/497) to up-vote the feature request). Set the SDK version at least as high as the app's framework version. * Publish path (`dotnet publish` command): Set the publish folder path to the app's repo folder. Example: `dotnet publish BlazorWebAssemblyXrefGenerator -c Release` -* Base HREF (`base_href` for the [`SteveSandersonMS/ghaction-rewrite-base-href` Action](https://github.com/SteveSandersonMS/ghaction-rewrite-base-href)): Set the base href for the app to the repository's name. Example: The Blazor sample's repository owner is `dotnet`. The Blazor sample's repository's name is `blazor-samples`. When the Xref Generator tool is deployed to GitHub Pages, its web address is based on the repository's name (`https://dotnet.github.io/blazor-samples/`). The base href of the app is `/blazor-samples/`, which is set into `base_href` for the `ghaction-rewrite-base-href` Action to write into the app's `wwwroot/index.html` `` tag when the app is deployed. For more information, see . +* Base HREF (`base_href` for the [`SteveSandersonMS/ghaction-rewrite-base-href` Action](https://github.com/SteveSandersonMS/ghaction-rewrite-base-href)): Set the SHA hash for the latest version of the Action (see the guidance in the [*GitHub Pages settings*](#github-pages-settings) section for instructions). Set the base href for the app to the repository's name. Example: The Blazor sample's repository owner is `dotnet`. The Blazor sample's repository's name is `blazor-samples`. When the Xref Generator tool is deployed to GitHub Pages, its web address is based on the repository's name (`https://dotnet.github.io/blazor-samples/`). The base href of the app is `/blazor-samples/`, which is set into `base_href` for the `ghaction-rewrite-base-href` Action to write into the app's `wwwroot/index.html` `` tag when the app is deployed. For more information, see . The GitHub-hosted Ubuntu (latest) server has a version of the .NET SDK pre-installed. You can remove the [`actions/setup-dotnet` Action](https://github.com/actions/setup-dotnet) step from the `static.yml` script if the pre-installed .NET SDK is sufficient to compile the app. To determine the .NET SDK installed for `ubuntu-latest`: From c55b6591e06ccf25c7e56bcd08376f6356a467f4 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Wed, 26 Mar 2025 11:04:17 -0400 Subject: [PATCH 3/5] [Pre3] Rename DisableMatchAllIgnoresLeftUriPart (#35056) --- aspnetcore/blazor/fundamentals/routing.md | 6 ++++++ .../release-notes/aspnetcore-10/includes/blazor.md | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/aspnetcore/blazor/fundamentals/routing.md b/aspnetcore/blazor/fundamentals/routing.md index 567c945df0b8..045725c9c377 100644 --- a/aspnetcore/blazor/fundamentals/routing.md +++ b/aspnetcore/blazor/fundamentals/routing.md @@ -1624,6 +1624,12 @@ Use a component in place There are two options that you can assign to the `Match` attribute of the `` element: + + * : The is active when it matches the current URL, ignoring the query string and fragment. To include matching on the query string/fragment, use the `Microsoft.AspNetCore.Components.Routing.NavLink.DisableMatchAllIgnoresLeftUriPart` [`AppContext` switch](/dotnet/fundamentals/runtime-libraries/system-appcontext). * (*default*): The is active when it matches any prefix of the current URL. diff --git a/aspnetcore/release-notes/aspnetcore-10/includes/blazor.md b/aspnetcore/release-notes/aspnetcore-10/includes/blazor.md index 7b9b259dc205..0c954e38f451 100644 --- a/aspnetcore/release-notes/aspnetcore-10/includes/blazor.md +++ b/aspnetcore/release-notes/aspnetcore-10/includes/blazor.md @@ -122,4 +122,14 @@ requestMessage.SetBrowserResponseStreamingEnabled(false); For more information, see [`HttpClient` and `HttpRequestMessage` with Fetch API request options (*Call web API* article)](xref:blazor/call-web-api?view=aspnetcore-10.0#httpclient-and-httprequestmessage-with-fetch-api-request-options). +XXXXXXXXXXXXXXXXXXXX CHANGE EARLIER COVERAGE XXXXXXXXXXXXXXXXXXXX + +In the "Ignore the query string and fragment when using `NavLinkMatch.All`" section, change +`DisableMatchAllIgnoresLeftUriPart` to `EnableMatchAllForQueryStringAndFragmentSwitchKey` +set to `true`. + +Also make this change in the *Routing* article at Line 1633. + +XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + --> From 442ed3617c66a3129eb9f2271ae18443e8bedf52 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Wed, 26 Mar 2025 11:28:18 -0400 Subject: [PATCH 4/5] Add `limit_req_zone` to Nginx hosting config (#35052) --- aspnetcore/blazor/host-and-deploy/webassembly.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aspnetcore/blazor/host-and-deploy/webassembly.md b/aspnetcore/blazor/host-and-deploy/webassembly.md index 1727bdbafe05..dd2888deb7a7 100644 --- a/aspnetcore/blazor/host-and-deploy/webassembly.md +++ b/aspnetcore/blazor/host-and-deploy/webassembly.md @@ -556,10 +556,11 @@ http { } ``` -When setting the [NGINX burst rate limit](https://www.nginx.com/blog/rate-limiting-nginx/#bursts) with [`limit_req`](https://nginx.org/docs/http/ngx_http_limit_req_module.html#limit_req), Blazor WebAssembly apps may require a large `burst` parameter value to accommodate the relatively large number of requests made by an app. Initially, set the value to at least 60: +When setting the [NGINX burst rate limit](https://www.nginx.com/blog/rate-limiting-nginx/#bursts) with [`limit_req`](https://nginx.org/docs/http/ngx_http_limit_req_module.html#limit_req) and [`limit_req_zone`](https://nginx.org/docs/http/ngx_http_limit_req_module.html), Blazor WebAssembly apps may require a large `burst`/`rate` parameter values to accommodate the relatively large number of requests made by an app. Initially, set the value to at least 60: ``` http { + limit_req_zone $binary_remote_addr zone=one:10m rate=60r/s; server { ... From 2c37895839138aad70e1d4e4e933bc6e124bf70d Mon Sep 17 00:00:00 2001 From: Dean Popovic Date: Wed, 26 Mar 2025 19:10:58 +0200 Subject: [PATCH 5/5] Update adding-controller.md (#35048) * Update adding-controller.md * Update aspnetcore/tutorials/first-mvc-app/adding-controller.md * Update date in adding-controller tutorial --------- Co-authored-by: Wade Pickett --- aspnetcore/tutorials/first-mvc-app/adding-controller.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aspnetcore/tutorials/first-mvc-app/adding-controller.md b/aspnetcore/tutorials/first-mvc-app/adding-controller.md index 3f1af946c689..e036c830f3ae 100644 --- a/aspnetcore/tutorials/first-mvc-app/adding-controller.md +++ b/aspnetcore/tutorials/first-mvc-app/adding-controller.md @@ -3,7 +3,7 @@ title: Part 2, add a controller to an ASP.NET Core MVC app author: wadepickett description: Part 2 of tutorial series on ASP.NET Core MVC. ms.author: wpickett -ms.date: 03/02/2025 +ms.date: 03/26/2025 monikerRange: '>= aspnetcore-3.1' uid: tutorials/first-mvc-app/adding-controller --- @@ -145,7 +145,7 @@ In the preceding URL: In the preceding example: -* The third URL segment matched the route parameter `id`. +* The third URL segment matched the route parameter `id` as defined in the routing template in the `Program.cs` file. * The `Welcome` method contains a parameter `id` that matched the URL template in the `MapControllerRoute` method. * The trailing `?` (in `id?`) indicates the `id` parameter is optional.