Skip to content

Commit e90cfe5

Browse files
Copilotguardrex
andcommitted
Fix typo and add missing backticks for environment names
Co-authored-by: guardrex <1622880+guardrex@users.noreply.github.com>
1 parent 0b10056 commit e90cfe5

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

aspnetcore/fundamentals/error-handling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ The following example shows how to register an `IExceptionHandler` implementatio
9696

9797
:::code language="csharp" source="~/fundamentals/error-handling/samples/8.x/ErrorHandlingSample/Program.cs" id="snippet_RegisterIExceptionHandler" highlight="7":::
9898

99-
When the preceding code runs in the `Development` environmentnt:
99+
When the preceding code runs in the `Development` environment:
100100

101101
* The `CustomExceptionHandler` is called first to handle an exception.
102102
* After logging the exception, the `TryHandleAsync` method returns `false`, so the [developer exception page](#developer-exception-page) is shown.

aspnetcore/fundamentals/static-files.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ To disable this behavior, set `EnableStaticAssetsDevelopmentCaching` to `true` i
152152

153153
## Static files in non-`Development` environments
154154

155-
When running an app locally, static web assets are only enabled in the `Development` environment. To enable static files for environments other than Development during local development and testing (for example, in the `Staging` environment), call <xref:Microsoft.AspNetCore.Hosting.WebHostBuilderExtensions.UseStaticWebAssets%2A> on the <xref:Microsoft.AspNetCore.Builder.WebApplicationBuilder>.
155+
When running an app locally, static web assets are only enabled in the `Development` environment. To enable static files for environments other than `Development` during local development and testing (for example, in the `Staging` environment), call <xref:Microsoft.AspNetCore.Hosting.WebHostBuilderExtensions.UseStaticWebAssets%2A> on the <xref:Microsoft.AspNetCore.Builder.WebApplicationBuilder>.
156156

157157
> [!WARNING]
158158
> Call <xref:Microsoft.AspNetCore.Hosting.WebHostBuilderExtensions.UseStaticWebAssets%2A> for the ***exact environment*** to prevent activating the feature in production, as it serves files from separate locations on disk *other than from the project*. The example in this section checks for the `Staging` environment with <xref:Microsoft.Extensions.Hosting.HostEnvironmentEnvExtensions.IsStaging%2A>.
@@ -171,7 +171,7 @@ if (builder.Environment.IsStaging())
171171
When <xref:Microsoft.AspNetCore.Hosting.IWebHostEnvironment.WebRootPath%2A?displayProperty=nameWithType> is set to a folder other than `wwwroot`, the following default behaviors are exhibited:
172172

173173
* In the `Development` environment, static assets are served from `wwwroot` if assets with the same name are in both `wwwroot` and a different folder assigned to <xref:Microsoft.AspNetCore.Hosting.IWebHostEnvironment.WebRootPath%2A>.
174-
* In any environment other than development, duplicate static assets are served from the <xref:Microsoft.AspNetCore.Hosting.IWebHostEnvironment.WebRootPath%2A> folder.
174+
* In any environment other than `Development`, duplicate static assets are served from the <xref:Microsoft.AspNetCore.Hosting.IWebHostEnvironment.WebRootPath%2A> folder.
175175

176176
Consider a web app created from the empty web template:
177177

@@ -189,7 +189,7 @@ var builder = WebApplication.CreateBuilder(new WebApplicationOptions
189189
By default, for requests to `/`:
190190

191191
* In the `Development` environment, `wwwroot/Index.html` is returned.
192-
* In any environment other than development, `wwwroot-custom/Index.html` is returned.
192+
* In any environment other than `Development`, `wwwroot-custom/Index.html` is returned.
193193

194194
To ensure assets from `wwwroot-custom` are always returned, use ***one*** of the following approaches:
195195

0 commit comments

Comments
 (0)