If you are using IIS for hosting your application, then the default upload file size is 4MB. To increase it, please use this below section in your web.config
–
<configuration> <system.web> <httpRuntime maxRequestLength="1048576" /> </system.web> </configuration>
For IIS7 and above, you also need to add the lines below:
<system.webServer> <security> <requestFiltering> <requestLimits maxAllowedContentLength="1073741824" /> </requestFiltering> </security> </system.webServer>
Note:
maxRequestLength
is measured in kilobytesmaxAllowedContentLength
is measured in bytes
which is why the values differ in this config example. (Both are equivalent to 1 GB.)
Related Posts:
- HTTP Error 503, the service is unavailable
- What does ‘IISReset’ do?
- What does ‘IISReset’ do?
- HTTP Error 403.14 – Forbidden – The Web server is configured to not list the contents of this directory
- How to Determine IUSR Password
- What does aspnet_regiis.exe do
- How do I resolve “HTTP Error 500.19 – Internal Server Error” on IIS7.0
- “This operation requires IIS integrated pipeline mode.”
- IIS error, Unable to start debugging on the webserver
- How handle Application Error Exception code: 0xc00000fd
- How to resolve “Server Error in ‘/’ Application” error?
- Chrome returns “Bad Request – Request Too Long” when navigating to local IIS Express
- “Exception has been thrown by the target of an invocation” error (mscorlib)
- ORA-12154 could not resolve the connect identifier specified
- What are .ashx files in an ASP.NET application?
- Does PHP supports MVP pattern?
- Server.Transfer Vs. Response.Redirect
- W3WP.EXE using 100% CPU – where to start?
- Error :The remote server returned an error: (401) Unauthorized
- Exception of type ‘System.OutOfMemoryException’ was thrown.
- Cannot read configuration file due to insufficient permissions
- A potentially dangerous Request.Form value was detected from the client
- Could not load file or assembly ‘Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed’
- How can I secure passwords stored inside web.config?
- ASP.NET Why are sessions timing out, sessionstate timeout set
- drop down list value in asp.net
- Cannot read configuration file due to insufficient permissions
- Can you recommend a .net template engine?
- Asp.net Hyperlink control equivalent to
- Error ‘2035’ (‘MQRC_NOT_AUTHORIZED’) While Connecting to MQ
- debug=true in web.config = BAD thing?
- Url.Action parameters?
- What is the difference between ASP.NET and ASP.NET MVC?
- Failed to load resource: the server responded with a status of 401 (Unauthorized) /App/AngularJS/angular.min.js
- Cannot open database “test” requested by the login. The login failed. Login failed for user ‘xyz\ASPNET’
- The following sections have been defined but have not been rendered for the layout page “~/Views/Shared/_Layout.cshtml”: “Scripts”
- The following sections have been defined but have not been rendered for the layout page “~/Views/Shared/_Layout.cshtml”: “Scripts”
- ASP.NET DateTime Picker
- System.ComponentModel.Win32Exception: Access is denied Error
- Could not load file or assembly ‘Microsoft.CodeDom.Providers.DotNetCompilerPlatform
- a page can have only one server-side form tag
- An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode
- Could not load file or assembly ‘Microsoft.ReportViewer.WebForms’
- Could not load file or assembly Exception from HRESULT: 0x80131040
- CS1617: Invalid option ‘6’ for /langversion; must be ISO-1, ISO-2, 3, 4, 5 or Default
- The localhost page isn’t working. localhost redirected you too many times
- Response Content type as CSV
- Unrecognized attribute ‘targetFramework’. Note that attribute names are case-sensitive
- Why is HttpContext.Current null?
- How to move div vertically down using CSS
- How to troubleshoot “System.Web.HttpException (0x80004005): File does not exist”?
- jquery $(this).id return Undefined
- C# function to return array
- “The transaction log for database is full due to ‘LOG_BACKUP'” in a shared host
- jQuery UI ” $(“#datepicker”).datepicker is not a function”
- What is w3wp.exe?
- Different between ./ , ../ , ../../ , ~/ on file path(URL) in asp.net
- The request was aborted: Could not create SSL/TLS secure channel
- The request was aborted: Could not create SSL/TLS secure channel
- JavaScript: Upload file
- applicationhost.config file path in IIS 7, 7.5, 8, 8.5 and IIS 10?
- Invalid length for a Base-64 char array
- The HTTP request was forbidden with client authentication scheme ‘Anonymous’. The remote server returned an error: (403) Forbidden
- Why am I getting a “Could not find a part of the path” exception?
- javascript “window.history.forward(1);” not working
- Can’t Add View from Controller in VS 2015 : “There was an error running the selected code generator”
- TypeError: $(…).DataTable is not a function
- Port 80 is being used by SYSTEM (PID 4), what is that?
- changing the owner of folder in linux
- The service cannot accept control messages at this time
- If a folder does not exist, create it
- What is the purpose of global.asax in asp.net
- File Upload In Angular?
- How to instantiate a File object in JavaScript?
- c# .net change label text
- The request was rejected because no multipart boundary was found in springboot
- How to change the text of a label?
- Format of the initialization string does not conform to specification starting at index 0
- How to use __doPostBack()
- Change the selected value of a drop-down list with jQuery
- Scalable wordpress setup
- How to update WordPress installed on IIS?
- Is it safe to use $_SERVER[‘REQUEST_URI’]?
- WordPress in IIS 7.5 – “cannot create directory”
- removing index.php IIS 7.5 webconfig
- Multisite installation on IIS gives 404 trying to access the admin dashboard
- WordPress, IIS7, SQL Server 2008, not showing posts (displays ‘Nothing Found…’) and only shows counts in admin – how to fix?
- WordPress on Microsoft-IIS/7.5 Server: Only Home Page works
- example.com/index.php/%postname is working while /%postname is not working WordPress on IIS6
- IIS 7 Rewrite with parent categories
- using rewrites to secure login page
- Default Permalink Type to Postname
- Working with Reverse Proxies and Multisite Installation
- home_url on IIS missing permalink index.php
- TN3 Plugin Not Working Under IIS / WebMatrix
- How do you make RSS feeds work under IIS 7?
- WordPress database setup Windows 2016 IIS
- Import from Windows to Linux
- WordPress main site and sub domain
- Best way to redirect all HTTP to HTTPS in IIS