Unable to upload 25 MB Excel File in ASP.Net

Last Reply on Nov 18, 2013 07:39 PM By narayanji

Posted on Nov 16, 2013 04:08 AM

Hi,

I ceated a webpage to upload an excel.

my application does following:

1) Saves this excel locally to a folder.

2) Validates it - check's for few rules.

3) Generates .csv's based on number of sheets in the excel.

4) Loads data from .csv's to Sql server tables by calling an SSIS package in my application.

Above steps are happening properly until i upload a file of around 25 MB.

When i'm trying to upload an excel containng around 45 sheets, whose size is around 33 MB it fails.

After sometime of uploading it just gives "page not found ", 404 error.

Please help me how to manage larger files (>25 MB) and please let me know if there is any limitation size for uploading an excel in application (it is a samll website built on C#.net 4.0 version )

Thank you

 

Posted on Nov 18, 2013 07:39 PM

Hi Mudassar,

I was able to sort out the issue. I added following code in web.config. Request Filtering is taking care of the limit of my file size

 

<system.webServer>

    <security>

      <requestFiltering >

        <requestLimits maxAllowedContentLength="1073741824" ></requestLimits>

      </requestFiltering>

    </security>

  </system.webServer>