Configuring Maximum Allowed File Size for IIS
The maxAllowedContentLength setting in Internet Information Services (IIS) specifies the maximum size (in bytes) of HTTP request content that the server will accept. This setting is critical for applications that handle file uploads because it prevents users from uploading files that exceed the defined size limit.
To configure the maximum upload file size in IIS, follow these steps:
Open the Internet Information Services (IIS) Manager.
In the Connections pane, navigate to:
Sites → Default Web Site → ToolsNet
In the Features View, under Management, double-click Configuration Editor.
In Configuration Editor, go to:
system.webServer → security → requestFiltering.
Expand the requestLimits node.
Set the value of maxAllowedContentLength to the desired file size in bytes.
For example, to allow a maximum file size of 200 MB, set the value to: 209715200
Click Apply to save the changes.
Restart Internet Information Services using the ToolsNet Service Manager.
This setting ensures that IIS rejects any HTTP request with a content length greater than the specified limit.