Solved

Importing long CSV file in asp.net

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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
asp.net figure out error 3 26
linq .concat equivalent with expression syntax 4 26
C# LINQ 5 27
Check only one toolstripmenu item 12 31
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

730 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