Skip to content

Document IISServerOptions.MaxRequestBodySize and IHttpMaxRequestBodySizeFeature in file upload guide - #37600

Open
Skyrunner-Dev-ops wants to merge 1 commit into
dotnet:mainfrom
Skyrunner-Dev-ops:docs/36039-upload-request-limits
Open

Document IISServerOptions.MaxRequestBodySize and IHttpMaxRequestBodySizeFeature in file upload guide#37600
Skyrunner-Dev-ops wants to merge 1 commit into
dotnet:mainfrom
Skyrunner-Dev-ops:docs/36039-upload-request-limits

Conversation

@Skyrunner-Dev-ops

@Skyrunner-Dev-ops Skyrunner-Dev-ops commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

… uploads (#36039)

Fixes #36039

Description

The file upload documentation (aspnetcore/mvc/models/file-uploads.md) previously explained Kestrel request size limits and IIS maxAllowedContentLength in web.config, but was missing guidance on IISServerOptions.MaxRequestBodySize for IIS in-process hosting as well as per-request dynamic body size configuration via IHttpMaxRequestBodySizeFeature.

This PR improves the "Server and app configuration" section by:

  • Detailing IISServerOptions.MaxRequestBodySize alongside maxAllowedContentLength and explaining how both limits interact when hosted in-process on IIS.
  • Documenting IHttpMaxRequestBodySizeFeature with a C# example for per-request request body size limits (including setting the limit to null and checking IsReadOnly).
  • Adding a summary table contrasting the scope, configuration, default value, and key notes for all request body size limit mechanisms (maxAllowedContentLength, IISServerOptions.MaxRequestBodySize, KestrelServerOptions.Limits.MaxRequestBodySize, RequestSizeLimitAttribute, and IHttpMaxRequestBodySizeFeature).

Changes

  • Expanded ### IIS in aspnetcore/mvc/models/file-uploads.md to document IISServerOptions.MaxRequestBodySize and explain dual IIS/ASP.NET Core limit enforcement.
  • Added ### Per-request request body size configuration in aspnetcore/mvc/models/file-uploads.md showing how to use IHttpMaxRequestBodySizeFeature.
  • Added ### Request body size limits summary in aspnetcore/mvc/models/file-uploads.md containing a comparison table for request size limit mechanisms.

Internal previews

File Preview link
aspnetcore/mvc/models/file-uploads.md Learn preview

Build report

@Skyrunner-Dev-ops

Skyrunner-Dev-ops commented Sep 5, 2026 via email

Copy link
Copy Markdown
Contributor Author

@Skyrunner-Dev-ops

Skyrunner-Dev-ops commented Sep 5, 2026 via email

Copy link
Copy Markdown
Contributor Author

@Skyrunner-Dev-ops

Skyrunner-Dev-ops commented Sep 6, 2026 via email

Copy link
Copy Markdown
Contributor Author

@Skyrunner-Dev-ops
Skyrunner-Dev-ops force-pushed the docs/36039-upload-request-limits branch from 0e52a59 to 6416599 Compare September 6, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UUF: File Uploads: Missing IISServerOptions and IHttpMaxRequestBodySizeFeature

2 participants