{"id":5003,"date":"2018-09-19T13:07:23","date_gmt":"2018-09-19T13:07:23","guid":{"rendered":"http:\/\/www.webputzer.com\/?page_id=5003"},"modified":"2018-09-19T13:17:42","modified_gmt":"2018-09-19T13:17:42","slug":"5003-2","status":"publish","type":"page","link":"http:\/\/www.webputzer.com\/?page_id=5003","title":{"rendered":"Large File Upload in IIS"},"content":{"rendered":"<div id=\"content\">\n<h2>Large File Upload in IIS<\/h2>\n<div>\n<p>By default, IIS web server allows for limited file size to be uploaded to the web server. For IIS 6 and IIS 7, the default maximum file upload size is 4 MB and 28.6 MB respectively. IIS 7 returns a 404 error (HTTP Error 404.13 &#8211; CONTENT_LENGTH_TOO_LARGE) if someone uploads something larger than 30MB. In order to allow for larger file size uploads, a few server changes are required.<\/p>\n<p>This tutorial is designed for IIS 7.0+. For 5.0 and 6.0, please check <a title=\"Large File Upload in IIS 6.0\" href=\"http:\/\/ajaxuploader.com\/large-file-upload-iis-6.htm\">here<\/a>. For Debugging guidelines, please click <a title=\"Large File Upload debug\" href=\"http:\/\/ajaxuploader.com\/large-file-upload-iis-debug.htm\">here<\/a>.<\/p>\n<p>You have 3 available options to increase the file upload limit:<\/p>\n<h3>1. Modify the maxAllowedContentLength setting in the web.config<\/h3>\n<p>You can increase the maximum file size by modify the\u00a0<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms689462%28v=vs.90%29.aspx\">maxAllowedContentLength<\/a>\u00a0setting in the web.config file:<\/p>\n<pre><system.webServer>\r\n<security>\r\n<requestFiltering>\r\n<requestLimits maxAllowedContentLength=\"2147483648\" \/>\r\n<\/requestFiltering>\r\n<\/security>\r\n<\/system.webServer><\/pre>\n<p>With the above maxAllowedContentLength, users can upload files that are 2 GB in size. This setting will work right away without restart IIS services.<\/p>\n<h3>2. Edit the request filtering feature settings and the request limits using IIS manager<\/h3>\n<ol>\n<li>Open IIS Manager.<\/li>\n<li>Select the website that you want to configure.<\/li>\n<li>Make sure you are in Features View per the button at the bottom of the manager.<\/li>\n<li>Select Requests Filtering and open it by double-clicking the icon. The Request Filtering pane displays.<\/li>\n<li>From the Actions pane on the right hand side of the screen click Edit Feature Settings&#8230; link. The Edit Request Filtering Settings window displays.<\/li>\n<li>In the Request Limits section, enter the appropriate Maximum allowed content length (Bytes) and then click the OK button.<\/li>\n<li>Restart IIS.<\/li>\n<\/ol>\n<p><img decoding=\"async\" src=\"http:\/\/www.webputzer.com\/wp-content\/uploads\/2018\/09\/requestFiltering_1.png\" \/><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.webputzer.com\/wp-content\/uploads\/2018\/09\/requestFiltering_3.png\" \/><\/p>\n<h3>3. Manually edit the ApplicationHost.config file<\/h3>\n<ol>\n<li>Click\u00a0<strong>Start<\/strong>. In the\u00a0<strong>Start Search<\/strong>\u00a0box, type\u00a0Notepad. Right-click\u00a0<strong>Notepad<\/strong>, and then click\u00a0<strong>Run as administrator<\/strong>.<\/li>\n<li>On the\u00a0<strong>File<\/strong>\u00a0menu, click\u00a0<strong>Open<\/strong>. In the\u00a0<strong>File name<\/strong>\u00a0box, type\u00a0%windir%\\system32\\inetsrv\\config\\applicationhost.config, and then click\u00a0<strong>Open<\/strong>.<\/li>\n<li>In the ApplicationHost.config file, locate the\u00a0<strong><requestLimits><\/strong>\u00a0node.<\/li>\n<li>Remove the\u00a0<b>maxAllowedContentLength<\/b>\u00a0property. Or, add a value that matches the size of the Content-Length header that the client sends as part of the request. By default, the value of the\u00a0<b>maxAllowedContentLength<\/b>\u00a0property is 30000000.\n<p>For example, modify the following configuration data inside the <requestFiltering> section.<\/p>\n<div>\n<pre class=\"code\"><requestLimits maxAllowedContentLength =\"<length>\" \/><\/pre>\n<\/div>\n<\/li>\n<li>Save the ApplicationHost.config file.<\/li>\n<\/ol>\n<h3>Debug Large File Upload<\/h3>\n<p>If you have successfully modified the requestLimits attribute, maxAllowedContentLength, but still cannot upload large files (over 30mb), please check the <a title=\"Large File Upload debug\" href=\"http:\/\/ajaxuploader.com\/large-file-upload-iis-debug.htm\">IIS Large File Upload Debugging Guidelines<\/a>.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Large File Upload in IIS By default, IIS web server allows for limited file size to be uploaded to the web server. For IIS 6 and IIS 7, the default maximum file upload size is 4 MB and 28.6 MB respectively. IIS 7 returns a 404 error (HTTP Error 404.13 &#8211; CONTENT_LENGTH_TOO_LARGE) if someone uploads [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"h5ap_radio_sources":[],"footnotes":""},"class_list":["post-5003","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/pages\/5003","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5003"}],"version-history":[{"count":0,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/pages\/5003\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.webputzer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5003"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}