Solved

Importing long CSV file in asp.net

Posted on 2013-01-10
3
653 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

867 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now