From 70d9e7401bb63d8e0e85e5ea5a6d6c4e95b1deee Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Fri, 19 Sep 2025 11:15:04 -0400 Subject: [PATCH 1/3] Fix persistent state API bug (#36129) --- .../blazor/state-management/prerendered-state-persistence.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aspnetcore/blazor/state-management/prerendered-state-persistence.md b/aspnetcore/blazor/state-management/prerendered-state-persistence.md index 14228127d395..5f033fdb1031 100644 --- a/aspnetcore/blazor/state-management/prerendered-state-persistence.md +++ b/aspnetcore/blazor/state-management/prerendered-state-persistence.md @@ -168,8 +168,8 @@ public class CounterService In `Program.cs`: ```csharp -builder.Services.RegisterPersistentService( - RenderMode.InteractiveAuto); +builder.Services.AddRazorComponents() + .RegisterPersistentService(RenderMode.InteractiveAuto); ``` Serialized properties are identified from the actual service instance: From 6ab28e5abab214c2bca2a1e719b6b9b23a0f9c6e Mon Sep 17 00:00:00 2001 From: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com> Date: Fri, 19 Sep 2025 18:18:41 +0200 Subject: [PATCH 2/3] add more info about null values in variables (#36124) --- aspnetcore/test/http-files.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/aspnetcore/test/http-files.md b/aspnetcore/test/http-files.md index 4ecd75b95519..37ce7b6c5b30 100644 --- a/aspnetcore/test/http-files.md +++ b/aspnetcore/test/http-files.md @@ -3,9 +3,9 @@ title: Use .http files in Visual Studio 2022 author: tdykstra description: Learn how to use .http files in Visual Studio 2022 to test ASPNET Core apps. monikerRange: '>= aspnetcore-8.0' -ms.topic: how-to ms.author: tdykstra -ms.date: 01/19/2024 +ms.date: 09/16/2025 +ms.topic: how-to uid: test/http-files --- # Use .http files in Visual Studio 2022 @@ -112,6 +112,8 @@ Lines that start with either `#` or `//` are comments. These lines are ignored w ## Variables A line that starts with `@` defines a variable by using the syntax `@VariableName=Value`. +The variable name is case-sensitive and can't contain any spaces. +The value can contain any characters, including the value `null` to represent a null value. Variables can be referenced in requests that are defined later in the file. They're referenced by wrapping their names in double curly braces, `{{` and `}}`. The following example shows two variables defined and used in a request: @@ -543,6 +545,7 @@ The Visual Studio 2022 `.http` file editor doesn't have all the features that th * Prompt variables * Customize response preview * Per-request settings +* Null-handling variables, e.g. using null-conditional or nullish coalescing operators (this is also unsupported in Visual Studio Code) ## Create an `.http` file From f3d89026a91c68e08488e2c8e745711801a4b558 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Fri, 19 Sep 2025 14:25:32 -0400 Subject: [PATCH 3/3] Add `StaticWebAssetContentTypeMapping` example (#36117) --- aspnetcore/fundamentals/static-files.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/aspnetcore/fundamentals/static-files.md b/aspnetcore/fundamentals/static-files.md index 0d05b5663c46..f44860bd447b 100644 --- a/aspnetcore/fundamentals/static-files.md +++ b/aspnetcore/fundamentals/static-files.md @@ -5,7 +5,7 @@ description: Learn how to serve and secure static files and configure Map Static monikerRange: '>= aspnetcore-3.1' ms.author: wpickett ms.custom: mvc -ms.date: 09/02/2025 +ms.date: 09/17/2025 uid: fundamentals/static-files --- # Static files in ASP.NET Core @@ -1123,16 +1123,24 @@ Property | Description Item group | Description | Metadata --- | --- -`StaticWebAssetContentTypeMapping` | Maps file patterns to content types and cache headers for endpoints. | Pattern, Cache -`StaticWebAssetFingerprintPattern` | Defines patterns for applying fingerprints to static web assets for cache busting. | Pattern, Expression +`StaticWebAssetContentTypeMapping` | Maps file patterns to content types and cache headers for endpoints. | `Pattern`, `Cache` +`StaticWebAssetFingerprintPattern` | Defines patterns for applying fingerprints to static web assets for cache busting. | `Pattern`, `Expression` Metadata Descriptions: -* **Pattern**: A glob pattern used to match files. For `StaticWebAssetContentTypeMapping`, it matches files to determine their content type (for example, `*.js` for JavaScript files). For `StaticWebAssetFingerprintPattern`, it identifies multi-extension files that require special fingerprinting treatment (for example, `*.lib.module.js`). +* **`Pattern`**: A glob pattern used to match files. For `StaticWebAssetContentTypeMapping`, it matches files to determine their content type (for example, `*.js` for JavaScript files). For `StaticWebAssetFingerprintPattern`, it identifies multi-extension files that require special fingerprinting treatment (for example, `*.lib.module.js`). -* **Cache**: Specifies the `Cache-Control` header value for the matched content type. This controls browser caching behavior (for example, `max-age=3600, must-revalidate` for media files). +* **`Cache`**: Specifies the `Cache-Control` header value for the matched content type. This controls browser caching behavior (for example, `max-age=3600, must-revalidate` for media files). -* **Expression**: Defines how the fingerprint is inserted into the filename. The default is `#[.{fingerprint}]`, which inserts the fingerprint before the extension. +* **`Expression`**: Defines how the fingerprint is inserted into the filename. The default is `#[.{FINGERPRINT}]`, which inserts the fingerprint (`{FINGERPRINT}` placeholder) before the extension. + +The following example maps the bitmap file pattern (`.bmp`) to the `image/bmp` content type with the `{CACHE HEADER}` placeholder representing the `Cache-Control` header to use for non-fingerprinted endpoints: + +```xml + + + +``` ## Runtime configuration options