Skip to content

Commit 93f5658

Browse files
authored
Merge pull request #36130 from dotnet/main
2 parents 64c15b7 + f3d8902 commit 93f5658

File tree

3 files changed

+21
-10
lines changed

3 files changed

+21
-10
lines changed

aspnetcore/blazor/state-management/prerendered-state-persistence.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ public class CounterService
168168
In `Program.cs`:
169169

170170
```csharp
171-
builder.Services.RegisterPersistentService<CounterService>(
172-
RenderMode.InteractiveAuto);
171+
builder.Services.AddRazorComponents()
172+
.RegisterPersistentService<CounterService>(RenderMode.InteractiveAuto);
173173
```
174174

175175
Serialized properties are identified from the actual service instance:

aspnetcore/fundamentals/static-files.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to serve and secure static files and configure Map Static
55
monikerRange: '>= aspnetcore-3.1'
66
ms.author: wpickett
77
ms.custom: mvc
8-
ms.date: 09/02/2025
8+
ms.date: 09/17/2025
99
uid: fundamentals/static-files
1010
---
1111
# Static files in ASP.NET Core
@@ -1123,16 +1123,24 @@ Property | Description
11231123

11241124
Item group | Description | Metadata
11251125
--- | ---
1126-
`StaticWebAssetContentTypeMapping` | Maps file patterns to content types and cache headers for endpoints. | Pattern, Cache
1127-
`StaticWebAssetFingerprintPattern` | Defines patterns for applying fingerprints to static web assets for cache busting. | Pattern, Expression
1126+
`StaticWebAssetContentTypeMapping` | Maps file patterns to content types and cache headers for endpoints. | `Pattern`, `Cache`
1127+
`StaticWebAssetFingerprintPattern` | Defines patterns for applying fingerprints to static web assets for cache busting. | `Pattern`, `Expression`
11281128

11291129
Metadata Descriptions:
11301130

1131-
* **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`).
1131+
* **`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`).
11321132

1133-
* **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).
1133+
* **`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).
11341134

1135-
* **Expression**: Defines how the fingerprint is inserted into the filename. The default is `#[.{fingerprint}]`, which inserts the fingerprint before the extension.
1135+
* **`Expression`**: Defines how the fingerprint is inserted into the filename. The default is `#[.{FINGERPRINT}]`, which inserts the fingerprint (`{FINGERPRINT}` placeholder) before the extension.
1136+
1137+
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:
1138+
1139+
```xml
1140+
<ItemGroup>
1141+
<StaticWebAssetContentTypeMapping Include="image/bmp" Cache="{CACHE HEADER}" Pattern="*.bmp" />
1142+
</ItemGroup>
1143+
```
11361144

11371145
## Runtime configuration options
11381146

aspnetcore/test/http-files.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ title: Use .http files in Visual Studio 2022
33
author: tdykstra
44
description: Learn how to use .http files in Visual Studio 2022 to test ASPNET Core apps.
55
monikerRange: '>= aspnetcore-8.0'
6-
ms.topic: how-to
76
ms.author: tdykstra
8-
ms.date: 01/19/2024
7+
ms.date: 09/16/2025
8+
ms.topic: how-to
99
uid: test/http-files
1010
---
1111
# Use .http files in Visual Studio 2022
@@ -112,6 +112,8 @@ Lines that start with either `#` or `//` are comments. These lines are ignored w
112112
## Variables
113113

114114
A line that starts with `@` defines a variable by using the syntax `@VariableName=Value`.
115+
The variable name is case-sensitive and can't contain any spaces.
116+
The value can contain any characters, including the value `null` to represent a null value.
115117

116118
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:
117119

@@ -543,6 +545,7 @@ The Visual Studio 2022 `.http` file editor doesn't have all the features that th
543545
* Prompt variables
544546
* Customize response preview
545547
* Per-request settings
548+
* Null-handling variables, e.g. using null-conditional or nullish coalescing operators (this is also unsupported in Visual Studio Code)
546549

547550
## Create an `.http` file
548551

0 commit comments

Comments
 (0)