From 762e79d3f64e6a754c4b43643b1229b32dd75e7f Mon Sep 17 00:00:00 2001 From: Vedika Gupta <52126954+VedikaGupt@users.noreply.github.com> Date: Sat, 21 Feb 2026 05:14:46 +0530 Subject: [PATCH 1/2] Fix dotenv variable casing in HTTP files example (#36651) Co-authored-by: Vedika Gupta --- aspnetcore/test/http-files.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/test/http-files.md b/aspnetcore/test/http-files.md index 29ca160669db..ec58b6a4fa84 100644 --- a/aspnetcore/test/http-files.md +++ b/aspnetcore/test/http-files.md @@ -447,7 +447,7 @@ And the `.http` file has this content: ```http GET {{HostAddress}}{{Path}} -X-UserName: {{$dotEnv USERNAME}} +X-UserName: {{$dotenv USERNAME}} ``` The `X-UserName` header will have "userFromDotenv". From f6cdc6e5a56b52a5102ab50a36e50aaf05254f7b Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Fri, 20 Feb 2026 18:50:12 -0500 Subject: [PATCH 2/2] Follow-up link and grammar updates (#36779) --- .../fundamentals/dependency-injection.md | 24 +++++------ .../includes/dependency-injection-5-7.md | 40 +++++++++---------- .../includes/dependency-injection-8.md | 22 +++++----- aspnetcore/fundamentals/middleware/write.md | 2 +- .../app-secrets/includes/app-secrets-3-5.md | 2 +- 5 files changed, 45 insertions(+), 45 deletions(-) diff --git a/aspnetcore/fundamentals/dependency-injection.md b/aspnetcore/fundamentals/dependency-injection.md index e703f07fc8df..6ad68240e3a8 100644 --- a/aspnetcore/fundamentals/dependency-injection.md +++ b/aspnetcore/fundamentals/dependency-injection.md @@ -21,11 +21,11 @@ For Blazor DI guidance, which adds to or supersedes the guidance in this article For information specific to dependency injection within MVC controllers, see . -For information on using dependency injection in applications other than web apps, see [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection). +For information on using dependency injection in applications other than web apps, see [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview). For information on dependency injection of options, see . -This article provides information on dependency injection in ASP.NET Core. The primary documentation on using dependency injection is contained in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection). +This article provides information on dependency injection in ASP.NET Core. The primary documentation on using dependency injection is contained in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview). [View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/fundamentals/dependency-injection/samples) ([how to download](xref:fundamentals/index#how-to-download-a-sample)) @@ -109,7 +109,7 @@ The following code is generated by the Razor Pages template using individual acc ## Service lifetimes -See [Service lifetimes](/dotnet/core/extensions/dependency-injection/service-lifetimes) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection) +See [Service lifetimes](/dotnet/core/extensions/dependency-injection/service-lifetimes) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview). To use scoped services in middleware, use one of the following approaches: @@ -120,9 +120,9 @@ For more information, see to obtain a service instance when you can use DI instead: @@ -352,8 +352,8 @@ The following table lists a small sample of these framework-registered services: * [Understand dependency injection basics in .NET](/dotnet/core/extensions/dependency-injection/basics) * [Dependency injection guidelines](/dotnet/core/extensions/dependency-injection/guidelines) * [Tutorial: Use dependency injection in .NET](/dotnet/core/extensions/dependency-injection/usage) -* [.NET dependency injection](/dotnet/core/extensions/dependency-injection) -* [ASP.NET Core Dependecy Injection: What is the IServiceCollection?](https://www.stevejgordon.co.uk/aspnet-core-dependency-injection-what-is-the-iservicecollection) +* [.NET dependency injection](/dotnet/core/extensions/dependency-injection/overview) +* [ASP.NET Core Dependency Injection: What is the IServiceCollection?](https://www.stevejgordon.co.uk/aspnet-core-dependency-injection-what-is-the-iservicecollection) * [Four ways to dispose IDisposables in ASP.NET Core](https://andrewlock.net/four-ways-to-dispose-idisposables-in-asp-net-core/) * [Writing Clean Code in ASP.NET Core with Dependency Injection (MSDN)](/archive/msdn-magazine/2016/may/asp-net-writing-clean-code-in-asp-net-core-with-dependency-injection) * [Explicit Dependencies Principle](/dotnet/standard/modern-web-apps-azure-architecture/architectural-principles#explicit-dependencies) diff --git a/aspnetcore/fundamentals/dependency-injection/includes/dependency-injection-5-7.md b/aspnetcore/fundamentals/dependency-injection/includes/dependency-injection-5-7.md index 459936070fb7..489b001469ef 100644 --- a/aspnetcore/fundamentals/dependency-injection/includes/dependency-injection-5-7.md +++ b/aspnetcore/fundamentals/dependency-injection/includes/dependency-injection-5-7.md @@ -11,11 +11,11 @@ ASP.NET Core supports the dependency injection (DI) software design pattern, whi For more information specific to dependency injection within MVC controllers, see . -For information on using dependency injection in applications other than web apps, see [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection). +For information on using dependency injection in applications other than web apps, see [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview). For more information on dependency injection of options, see . -This topic provides information on dependency injection in ASP.NET Core. The primary documentation on using dependency injection is contained in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection). +This topic provides information on dependency injection in ASP.NET Core. The primary documentation on using dependency injection is contained in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview). [View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/fundamentals/dependency-injection/samples) ([how to download](xref:fundamentals/index#how-to-download-a-sample)) @@ -99,7 +99,7 @@ The following code is generated by the Razor Pages template using individual use ## Service lifetimes -See [Service lifetimes](/dotnet/core/extensions/dependency-injection/service-lifetimes) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection) +See [Service lifetimes](/dotnet/core/extensions/dependency-injection/service-lifetimes) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview). To use scoped services in middleware, use one of the following approaches: @@ -110,9 +110,9 @@ For more information, see to obtain a service instance when you can use DI instead: @@ -362,11 +362,11 @@ ASP.NET Core supports the dependency injection (DI) software design pattern, whi For more information specific to dependency injection within MVC controllers, see . -For information on using dependency injection in applications other than web apps, see [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection). +For information on using dependency injection in applications other than web apps, see [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview). For more information on dependency injection of options, see . -This topic provides information on dependency injection in ASP.NET Core. The primary documentation on using dependency injection is contained in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection). +This topic provides information on dependency injection in ASP.NET Core. The primary documentation on using dependency injection is contained in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview). [View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/fundamentals/dependency-injection/samples) ([how to download](xref:fundamentals/index#how-to-download-a-sample)) @@ -489,7 +489,7 @@ The following code is generated by the Razor Pages template using individual use ## Service lifetimes -See [Service lifetimes](/dotnet/core/extensions/dependency-injection/service-lifetimes) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection) +See [Service lifetimes](/dotnet/core/extensions/dependency-injection/service-lifetimes) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview). To use scoped services in middleware, use one of the following approaches: @@ -500,9 +500,9 @@ For more information, see to obtain a service instance when you can use DI instead: diff --git a/aspnetcore/fundamentals/dependency-injection/includes/dependency-injection-8.md b/aspnetcore/fundamentals/dependency-injection/includes/dependency-injection-8.md index f8f79b8fd72f..ab3dd180bffe 100644 --- a/aspnetcore/fundamentals/dependency-injection/includes/dependency-injection-8.md +++ b/aspnetcore/fundamentals/dependency-injection/includes/dependency-injection-8.md @@ -12,11 +12,11 @@ ASP.NET Core supports the dependency injection (DI) software design pattern, whi For more information specific to dependency injection within MVC controllers, see . -For information on using dependency injection in applications other than web apps, see [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection). +For information on using dependency injection in applications other than web apps, see [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview). For more information on dependency injection of options, see . -This topic provides information on dependency injection in ASP.NET Core. The primary documentation on using dependency injection is contained in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection). +This topic provides information on dependency injection in ASP.NET Core. The primary documentation on using dependency injection is contained in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview). [View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/fundamentals/dependency-injection/samples) ([how to download](xref:fundamentals/index#how-to-download-a-sample)) @@ -100,7 +100,7 @@ The following code is generated by the Razor Pages template using individual acc ## Service lifetimes -See [Service lifetimes](/dotnet/core/extensions/dependency-injection/service-lifetimes) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection) +See [Service lifetimes](/dotnet/core/extensions/dependency-injection/service-lifetimes) in [Dependency injection in .NET](/dotnet/core/extensions/dependency-injection/overview). To use scoped services in middleware, use one of the following approaches: @@ -111,9 +111,9 @@ For more information, see to obtain a service instance when you can use DI instead: @@ -355,7 +355,7 @@ The following table lists a small sample of these framework-registered services: * [Understand dependency injection basics in .NET](/dotnet/core/extensions/dependency-injection/basics) * [Dependency injection guidelines](/dotnet/core/extensions/dependency-injection/guidelines) * [Tutorial: Use dependency injection in .NET](/dotnet/core/extensions/dependency-injection/usage) -* [.NET dependency injection](/dotnet/core/extensions/dependency-injection) +* [.NET dependency injection](/dotnet/core/extensions/dependency-injection/overview) * [ASP.NET CORE DEPENDENCY INJECTION: WHAT IS THE ISERVICECOLLECTION?](https://www.stevejgordon.co.uk/aspnet-core-dependency-injection-what-is-the-iservicecollection) * [Four ways to dispose IDisposables in ASP.NET Core](https://andrewlock.net/four-ways-to-dispose-idisposables-in-asp-net-core/) * [Writing Clean Code in ASP.NET Core with Dependency Injection (MSDN)](/archive/msdn-magazine/2016/may/asp-net-writing-clean-code-in-asp-net-core-with-dependency-injection) diff --git a/aspnetcore/fundamentals/middleware/write.md b/aspnetcore/fundamentals/middleware/write.md index 1be5cd0c74e0..d0f82577f998 100644 --- a/aspnetcore/fundamentals/middleware/write.md +++ b/aspnetcore/fundamentals/middleware/write.md @@ -71,7 +71,7 @@ Middleware components can resolve their dependencies from [dependency injection ## Per-request middleware dependencies Middleware is constructed at app startup and therefore has application life -time. [Scoped lifetime](/dotnet/core/extensions/dependency-injection#scoped) services used by middleware constructors aren't shared with other dependency-injected types during each request. To share a *scoped* service between middleware and other types, add these services to the `InvokeAsync` method's signature. The `InvokeAsync` method can accept additional parameters that are populated by DI: +time. [Scoped lifetime](/dotnet/core/extensions/dependency-injection/service-lifetimes#scoped) services used by middleware constructors aren't shared with other dependency-injected types during each request. To share a *scoped* service between middleware and other types, add these services to the `InvokeAsync` method's signature. The `InvokeAsync` method can accept additional parameters that are populated by DI: :::code language="csharp" source="~/fundamentals/middleware/write/6sample/WebMiddleware/MyCustomMiddleware.cs"::: diff --git a/aspnetcore/security/app-secrets/includes/app-secrets-3-5.md b/aspnetcore/security/app-secrets/includes/app-secrets-3-5.md index c2d329b73316..bf4ac00ed387 100644 --- a/aspnetcore/security/app-secrets/includes/app-secrets-3-5.md +++ b/aspnetcore/security/app-secrets/includes/app-secrets-3-5.md @@ -145,7 +145,7 @@ When `CreateDefaultBuilder` isn't called, add the user secrets configuration sou ### Read the secret via the Configuration API -If the user secrets configuration source is registered, the .NET Configuration API can read the secrets. [Constructor injection](/dotnet/core/extensions/dependency-injection#constructor-injection-behavior) can be used to gain access to the .NET Configuration API. Consider the following examples of reading the `Movies:ServiceApiKey` key: +If the user secrets configuration source is registered, the .NET Configuration API can read the secrets. [Constructor injection](/dotnet/core/extensions/dependency-injection/overview#constructor-injection-behavior) can be used to gain access to the .NET Configuration API. Consider the following examples of reading the `Movies:ServiceApiKey` key: **Startup class:**