From 89057003b32cebef3c59e14fa2fbebd03e91f6d0 Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Tue, 6 Jun 2017 16:02:36 -0700 Subject: [PATCH] Check IHttpMaxRequestBodySizeFeature.IsReadOnly (#379) --- src/Microsoft.AspNetCore.Server.IISIntegration/IISMiddleware.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.AspNetCore.Server.IISIntegration/IISMiddleware.cs b/src/Microsoft.AspNetCore.Server.IISIntegration/IISMiddleware.cs index 5729c9b0cb..2d5b86f82d 100644 --- a/src/Microsoft.AspNetCore.Server.IISIntegration/IISMiddleware.cs +++ b/src/Microsoft.AspNetCore.Server.IISIntegration/IISMiddleware.cs @@ -77,7 +77,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration } var bodySizeFeature = httpContext.Features.Get(); - if (bodySizeFeature != null) + if (bodySizeFeature != null && !bodySizeFeature.IsReadOnly) { // IIS already limits this, no need to do it twice. bodySizeFeature.MaxRequestBodySize = null;