From c8714aab291371ed3bdc0be3d6fc1dd817015a55 Mon Sep 17 00:00:00 2001 From: David Poindexter Date: Fri, 8 Sep 2023 16:13:46 -0400 Subject: [PATCH] Update web.config max upload size defaults, correct backend calcs, and fix validation issue preventing increase --- DNN Platform/Library/Common/Utilities/Config.cs | 4 +--- DNN Platform/Tests/App.config | 2 +- DNN Platform/Website/development.config | 7 ++++++- DNN Platform/Website/release.config | 7 ++++++- .../Services/SecurityController.cs | 2 +- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/DNN Platform/Library/Common/Utilities/Config.cs b/DNN Platform/Library/Common/Utilities/Config.cs index 83ba6b19af2..b1ccfe49c19 100644 --- a/DNN Platform/Library/Common/Utilities/Config.cs +++ b/DNN Platform/Library/Common/Utilities/Config.cs @@ -318,8 +318,7 @@ public static long GetRequestFilterSize(IApplicationStatusInfo appStatus) if (httpNode != null) { - var maxAllowedContentLength = XmlUtils.GetAttributeValueAsLong(httpNode.CreateNavigator(), "maxAllowedContentLength", 30000000); - return maxAllowedContentLength / 1024 / 1024; + return 4294967295 / 1024 / 1024; // 4GB (max allowedContentLength supported in IIS7) } return DefaultRequestFilter; @@ -352,7 +351,6 @@ public static void SetMaxUploadSize(IApplicationStatusInfo appStatus, long newSi if (httpNode != null) { httpNode.Attributes["maxRequestLength"].InnerText = (newSize / 1024).ToString("#"); - httpNode.Attributes["requestLengthDiskThreshold"].InnerText = (newSize / 1024).ToString("#"); } httpNode = configNav.SelectSingleNode("configuration//system.webServer//security//requestFiltering//requestLimits") ?? diff --git a/DNN Platform/Tests/App.config b/DNN Platform/Tests/App.config index 95eedde44a2..3757a08e605 100644 --- a/DNN Platform/Tests/App.config +++ b/DNN Platform/Tests/App.config @@ -114,7 +114,7 @@ - + - + - +