Skip to content

Doc: Clarify delegating handler transient lifetime requirement (#32255) - #37816

Merged
guardrex merged 1 commit into
dotnet:mainfrom
SkyDevLab:docs/32255-delegating-handler-transient-lifetime
Oct 9, 2026
Merged

guardrex merged 1 commit into
dotnet:mainfrom
SkyDevLab:docs/32255-delegating-handler-transient-lifetime

Conversation

@SkyDevLab

@SkyDevLab SkyDevLab commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #32255

Summary of Changes

  • Explicitly documented that delegating handlers registered with DI and added via AddHttpMessageHandler<THandler> must be registered with a Transient lifetime.
  • Clarified that delegating handlers cannot be reused across multiple HTTP client pipelines, and registering a handler as a singleton results in an InvalidOperationException at runtime.
  • Updated across relevant version moniker sections for consistency.
  • Updated ms.date.

Internal previews

File Preview link
aspnetcore/fundamentals/http-requests.md Learn preview

Build report

@SkyDevLab
SkyDevLab requested a review from guardrex as a code owner October 8, 2026 17:23
@guardrex guardrex self-assigned this Oct 8, 2026

@guardrex guardrex left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ IT! Nice clarification! Thanks, @SkyDevLab! 🎸

@guardrex
guardrex merged commit c7bcd83 into dotnet:main Oct 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants