Solved

Importing long CSV file in asp.net

Posted on 2013-01-10
3
656 Views
Last Modified: 2013-01-16
I have option in my web application, there user can upload a csv list of users. Total number of users can be in 15,000 or 1 million.

We I run the import process in the same thread then I gets Request Timeout error.

what should I do so that I let the user import this much big csv list.
0
Comment
Question by:yadavdep
  • 2
3 Comments
 
LVL 42

Accepted Solution

by:
sedgwick earned 250 total points
ID: 38762256
first compress the csv list to binary stream, secondly increase the timeout in web.config to the specific page:


<location path="<the-page>.aspx">
        <system.web>
                <httpRuntime executionTimeout="250"/>
        </system.web>
</location>

FYI, ExecutionTimeout specifies the maximum number of seconds that a request is allowed to execute before being automatically shut down by ASP.NET.
The default value for this attribute has been set to 90 seconds in ASP.NET 1.x and was increased to 110 seconds in ASP.NET 2.0.
from
0
 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 38762261
see here are some options .. which may help you

http://www.codeproject.com/Questions/212510/how-import-CSV-file-in-asp-net
0
 
LVL 42

Expert Comment

by:sedgwick
ID: 38762274
by default, iis7 supports up to 30MB files, you can increase this number to over 100MB using the following command:
Adjusting File upload size in IIS7

if you are using asp FileUpload control, here's a tutorial how to achieve this:
FileUpload tutorial

using old fashioned input type="file":
Upload file old-fashioned
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question