system.web節點下的 maxRequestLength屬性來指定最大上傳文件的size,默認值是4M
<system.web>
    <httpRuntime maxRequestLength="204800" executionTimeout="7200"/>
 
        system.webServer節點下的maxAllowedContentLength 屬性來指定最大上傳文件的size,默認值是28.61M。(IIS7及以上)
<system.webServer>
  <security>
    <requestFiltering>
      <requestLimits maxAllowedContentLength="30000000" ></requestLimits>
 
        以上兩個設置可以再程序的web.config中設置。
IIS里面怎么去查看呢:打開IIS 選中自己的站點,功能試圖—管理—配置編輯器

以上兩個都可以通過下圖查看

 
 
