Skip to content

Instantly share code, notes, and snippets.

@anishihara
Created September 19, 2012 21:16
Show Gist options
  • Save anishihara/3752321 to your computer and use it in GitHub Desktop.
Save anishihara/3752321 to your computer and use it in GitHub Desktop.
Increase upload limit of a path in IIS

#Increase upload limit of a path in IIS

It is known that to increase the file upload limit in IIS, we need to change (or add) in web.config the following snippet inside configuration:

<system.web>
    < httpRuntime maxRequestLength = "{MAX_SIZE}" />
</ system.web>

This is a risk in security, you are increasing the upload limit to ALL THE SITE.

To increase the upload limit on only a path (E.g: Home/Upload), add the following to web.config:

<location path= "Home/Upload">
    < system.web>
        < httpRuntime maxRequestLength ="{MAX_SIZE}" />
    </ system.web>
</location>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment