﻿<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://developers.de/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Andreas Lehmann : IIS7</title><link />http://developers.de/blogs/andreas_lehmann/archive/tags/IIS7/default.aspx<description>Tags: IIS7</description><dc:language>en</dc:language><generator>CommunityServer 2008 SP1 (Build: 30619.63)</generator><item><title>Set max upload size for IIS7 web applications</title><link />http://developers.de/blogs/andreas_lehmann/archive/2009/06/24/set-max-upload-size-for-iis7-web-applications.aspx<pubdate>Wed, 24 Jun 2009 11:52:32 GMT</pubdate><guid ispermalink="false">7e491611-45ad-4dae-a68f-c4cb64439510:6103</guid><dc:creator>alehmann</dc:creator><slash:comments>2</slash:comments><wfw:commentrss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://developers.de/blogs/andreas_lehmann/rsscomments.aspx?PostID=6103</wfw:commentrss><comments>http://developers.de/blogs/andreas_lehmann/archive/2009/06/24/set-max-upload-size-for-iis7-web-applications.aspx#comments</comments><description>&lt;p&gt;If you want to set the maximum request size, e.g. to define the maximum size for file uploads, you can use the way described in this post:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://developers.de/blogs/nadine_storandt/archive/2009/04/24/moss-set-max-upload-size-on-iis-7.aspx" href="http://developers.de/blogs/nadine_storandt/archive/2009/04/24/moss-set-max-upload-size-on-iis-7.aspx"&gt;http://developers.de/blogs/nadine_storandt/archive/2009/04/24/moss-set-max-upload-size-on-iis-7.aspx&lt;/a&gt; (thanks to Nadine)&lt;/p&gt;  &lt;p&gt;This command line tool just adds a new node to the web.config file of the target application. This node is added to the &amp;lt;system.webServer&amp;gt; section:&lt;/p&gt;  &lt;div style="border-bottom:gray 1px solid;border-left:gray 1px solid;padding-bottom:4px;line-height:12pt;background-color:#f4f4f4;margin:20px 0px 10px;padding-left:4px;width:97.5%;padding-right:4px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;max-height:200px;font-size:8pt;overflow:auto;border-top:gray 1px solid;cursor:text;border-right:gray 1px solid;padding-top:4px;"&gt;   &lt;div style="border-bottom-style:none;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;padding-left:0px;width:100%;padding-right:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;     &lt;pre style="border-bottom-style:none;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;security&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="border-bottom-style:none;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;requestFiltering&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="border-bottom-style:none;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;"&gt;   3:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000;"&gt;requestLimits&lt;/span&gt; &lt;span style="color:#ff0000;"&gt;maxAllowedContentLength&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;=&amp;quot;52428800&amp;quot;&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="border-bottom-style:none;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:#f4f4f4;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;"&gt;   4:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;requestFiltering&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="border-bottom-style:none;padding-bottom:0px;line-height:12pt;border-right-style:none;background-color:white;margin:0em;padding-left:0px;width:100%;padding-right:0px;font-family:consolas, &amp;#39;Courier New&amp;#39;, courier, monospace;border-top-style:none;color:black;font-size:8pt;border-left-style:none;overflow:visible;padding-top:0px;"&gt;&lt;span style="color:#606060;"&gt;   5:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000;"&gt;security&lt;/span&gt;&lt;span style="color:#0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;The value of the maxAllowedContentLength attribute is the number of bytes for the request.
  &lt;br /&gt;If you want to allow 50 MB file upload this means 1024 x 1024 x 50 = 52428800&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://developers.de/aggbug.aspx?PostID=6103" width="1" height="1"&gt;</description><category domain="http://developers.de/blogs/andreas_lehmann/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://developers.de/blogs/andreas_lehmann/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item></channel></rss>