Solved

Importing long CSV file in asp.net

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 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

10 Experts available now in Live!

Get 1:1 Help Now