locked
Windows Azure ASP.NET MVC Role and bumping file upload size RRS feed

  • Question

  • Hi there,

    The users of my app should be able to uplaod files as large a 1-2gb. However, I am hitting against 30 mb default file upload size. I looked into forums and saw this command from one of the engineers on the IIS team:

    %windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/security/requestFiltering -requestLimits.maxAllowedContentLength:<new-value>

    Now I am trying to determine if I can execute this command as part of the deployment. Is this a right approach?

    I believe that even if I specify proper values in in my web.config for my app, the machine.config take precedence.

     

    Thursday, November 4, 2010 1:02 AM

Answers

  • Has this been resolved? If not, are you hitting default 90s timeouts; can you try increasing the timeout limit? Please let us know how we can help here.

    Thanks,

    jai

    • Marked as answer by Brad Calder Monday, March 12, 2012 9:20 AM
    Sunday, March 27, 2011 2:18 AM

All replies

  • Hello, actually web.config takes precedence to machine.config. So you should be override the setting in web.config:

      <system.webServer>

        <security>

          <requestFiltering>

            <requestLimits maxAllowedContentLength="large value"/>

          </requestFiltering>

        </security>

      </system.webServer>

    Additionally, you need to config the maxRequestLength setting under system.web. This configuration is used by ASP.NET runtime.

      <system.web>

        <httpRuntime maxRequestLength="large value"/>

      </system.web>


    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, November 4, 2010 1:56 AM
  • Here are my settings

     

     
    <system.web>
    <httpRuntime maxRequestLength="2097151" executionTimeout="7200" />
      <!-- 20 minute session timeout, see if it works-->
      <sessionState timeout="60" />

    </system.web>

    <system.webServer>
     <security>
      
        <requestFiltering>
         <requestLimits maxAllowedContentLength="2147483648" />
        </requestFiltering>
       </security>

    </system.webServer>

     

    The problem persists.

    Thursday, November 4, 2010 8:10 PM
  • What exactly problems do you have? I was able to upload a 100 MB from local file system to a MVC application and then to blob without any problems. Can you post the code, and describe the error message?
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, November 5, 2010 2:08 AM
  • Essentially I try to upload the file to the webserver via <input file>  and then use blob API to upload. The code works without an issue on the local filesystem, but fails for large files on Azure. I don't think blob api is having an issue since I don't get one of my error pages, but I get an IE blank screen, which signifies that the connection to the web server is lost.

     

    If you like you can navigate here to try out our app: http://de3e450ebaef4aca9dbfa83c937071fd.cloudapp.net/

     

    Friday, November 5, 2010 7:09 PM
  • Can you try to take the essential code, and send a reproduce project to v-ylluo@microsoft.com? I'll have a look.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, November 12, 2010 7:45 AM
  • Has this been resolved? If not, are you hitting default 90s timeouts; can you try increasing the timeout limit? Please let us know how we can help here.

    Thanks,

    jai

    • Marked as answer by Brad Calder Monday, March 12, 2012 9:20 AM
    Sunday, March 27, 2011 2:18 AM
  • We have tried the same settings on Azure Web Site and also get the 30MB limit.

    Has anyone found a way round this?

    Wednesday, August 8, 2012 4:02 PM