Why are uploaded files to ASP.NET web Application greater than 12MBbeing shown as 0MB?

Discussion in 'ASP .Net' started by newemployee909090@gmail.com, Nov 30, 2012.

  1. Guest

    Our ASP.NET C# web application is used in the following environment - .NET Framework 4 - IIS 7 - Windows 2008 - Visual Studio 2010 .NET IDE - C# - HTTPS ( SSL ) Our ASP.NET C# web application uploads various files like jpgs, mp4, mp3, pngs, docx, txt, etc to a folder called ClientBin. However, if wedeploy the application to an IIS7 server, we have to give the web user of our application permission to upload file. We give the \IIS_IUSRS group permission to execute, read, write and execute on our ClientBin upload folder.

    A web user can upload files that have size less than approximately 12MB.

    However, when a web user uploads any more than approximately 12MB, the filethat gets uploaded will be 0 bytes on the server's ClientBin upload folder..

    In our Web.config, we have the following configurations for httpRuntime tag:

    <system.web>
    ....
    ......
    .........
    ...............
    <httpRuntime maxRequestLength="1048576" executionTimeout="50000" useFullyQualifiedRedirectUrl="false" requestLengthDiskThreshold="15360"minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100" />


    </system.web>



    In our Web.config, we have the following configurations for requestLimits tag:
    <system.webServer>

    ...............
    ..........................
    <security>
    <requestFiltering>
    <requestLimits maxAllowedContentLength="2000000000" />
    <fileExtensions>
    <add fileExtension=".aspx" allowed="true" />
    </fileExtensions>
    </requestFiltering>
    </security>
    </system.webServer>

    I also took the undesired approach of modifying the machine.config file by creating the following settings:

    <system.web>

    <processModel responseDeadlockInterval="0:09:00"
    responseRestartDeadlockInterval="0:09:00" />

    ......................
    ...........................................
    ..............................................................
    </system.web>

    In IIS 7, I clicked on the website and expanded it then clicked the ASP icon.

    Expand the Limits Properties icon, and change the value in the “Maximum Requesting Entity Body Limit” to a value larger than 200000 (which is about 200kb). 4194304 would be about 4 Mb, 41943040 would be 40 Mb.

    Why are uploaded files to ASP.NET web Application greater than 12MB being shown as 0MB ?
     
    , Nov 30, 2012
    #1
    1. Advertisements

  2. Guest

    Re: Why are uploaded files to ASP.NET web Application greater than12MB being shown as 0MB?

    On Friday, November 30, 2012 11:32:22 AM UTC-5, wrote:
    > Our ASP.NET C# web application is used in the following environment - .NET Framework 4 - IIS 7 - Windows 2008 - Visual Studio 2010 .NET IDE - C# - HTTPS ( SSL ) Our ASP.NET C# web application uploads various files like jpgs, mp4, mp3, pngs, docx, txt, etc to a folder called ClientBin. However, if we deploy the application to an IIS7 server, we have to give the web user of our application permission to upload file. We give the \IIS_IUSRS group permission to execute, read, write and execute on our ClientBin upload folder.
    >
    >
    >
    > A web user can upload files that have size less than approximately 12MB.
    >
    >
    >
    > However, when a web user uploads any more than approximately 12MB, the file that gets uploaded will be 0 bytes on the server's ClientBin upload folder.
    >
    >
    >
    > In our Web.config, we have the following configurations for httpRuntime tag:
    >
    >
    >
    > <system.web>
    >
    > ...
    >
    > .....
    >
    > ........
    >
    > ..............
    >
    > <httpRuntime maxRequestLength="1048576" executionTimeout="50000" useFullyQualifiedRedirectUrl="false" requestLengthDiskThreshold="15360" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100" />
    >
    >
    >
    >
    >
    > </system.web>
    >
    >
    >
    >
    >
    >
    >
    > In our Web.config, we have the following configurations for requestLimitstag:
    >
    > <system.webServer>
    >
    >
    >
    > ..............
    >
    > .........................
    >
    > <security>
    >
    > <requestFiltering>
    >
    > <requestLimits maxAllowedContentLength="2000000000" />
    >
    > <fileExtensions>
    >
    > <add fileExtension=".aspx" allowed="true" />
    >
    > </fileExtensions>
    >
    > </requestFiltering>
    >
    > </security>
    >
    > </system.webServer>
    >
    >
    >
    > I also took the undesired approach of modifying the machine.config file by creating the following settings:
    >
    >
    >
    > <system.web>
    >
    >
    >
    > <processModel responseDeadlockInterval="0:09:00"
    >
    > responseRestartDeadlockInterval="0:09:00" />
    >
    >
    >
    > .....................
    >
    > ..........................................
    >
    > .............................................................
    >
    > </system.web>
    >
    >
    >
    > In IIS 7, I clicked on the website and expanded it then clicked the ASP icon.
    >
    >
    >
    > Expand the Limits Properties icon, and change the value in the “MaximumRequesting Entity Body Limit” to a value larger than 200000 (which is about 200kb). 4194304 would be about 4 Mb, 41943040 would be 40 Mb.
    >
    >
    >
    > Why are uploaded files to ASP.NET web Application greater than 12MB beingshown as 0MB ?




    What IIS (and IDE) did you (initially) set/use for the creation of the (ASP..NET) file upload application pages to work with? You say that it worked onthe previous system....what OS/Web server was that performed on? Are you self hosting/in-house, or doing the upload service through a hosting company? A little more details about the scenario would surely help.

    I would think to go and check the server configuration in IIS 7, since it seems like a size 'cap' is applied to this situation. I would suspect that something in the IIS 7 server config is playing with you, and this could be the case if you are hosted by a hosting service.
     
    , Dec 11, 2012
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Matt G
    Replies:
    1
    Views:
    1,499
    Deepak Kumar Vasudevan
    Aug 22, 2003
  2. darrel
    Replies:
    1
    Views:
    487
    darrel
    Jun 10, 2005
  3. falcon
    Replies:
    10
    Views:
    23,207
    Roedy Green
    Feb 24, 2006
  4. Mr. SweatyFinger

    why why why why why

    Mr. SweatyFinger, Nov 28, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    1,585
    Mark Rae
    Dec 21, 2006
  5. Mr. SweatyFinger
    Replies:
    2
    Views:
    3,049
    Smokey Grindel
    Dec 2, 2006
  6. Dwight Army of Champions
    Replies:
    4
    Views:
    4,125
    John H.
    Mar 17, 2010
  7. Alan
    Replies:
    5
    Views:
    811
    Emile van Sebille
    Jan 24, 2011
  8. Mete Akalýn
    Replies:
    1
    Views:
    685
    Mete Akalýn
    Jul 25, 2003
Loading...