Mvc 5 timeoutNKneel k11yAsked Jul 29, 2015, 9:21 AM EDT8 answersShareLinkedInXCopy linkSaveHi,In mvc 5, I got a time out error. I need to display 40,000 records. Thanks,-Neelima
Mvc 5 timeoutNKneel k11yAsked Jul 29, 2015, 9:21 AM EDT8 answersShareLinkedInXCopy linkSaveHi,In mvc 5, I got a time out error. I need to display 40,000 records. Thanks,-Neelima
Ramesh MaruthiRank #937 · 2.2K reputation11y agoPosted Jul 29, 2015, 9:47 AM EDT0 Hi Nelima, Can you elaborate ur issue a little more. Where did you got the time out issue ??0
NKneel k143 reputation11y agoPosted Jul 29, 2015, 9:52 AM EDT0Thanks for reply, I need to display 40,000 records and export these records to Excel. When I am trying to display the records i got system out of memory exception.0
Ramesh MaruthiRank #937 · 2.2K reputation11y agoPosted Jul 30, 2015, 5:11 AM EDT0Can you break the task by using threading into 4 parts as 1 part 10,000 records , and write to excel file.0
NKneel k143 reputation11y agoPosted Jul 30, 2015, 5:13 AM EDT0I can post my controller code and view code, can you please change the code, I don't know threading concept. Controller code: public ActionResult RunReports(int? id) { DomainContext CurrentLoginUser = ActiveDirectory_AccessModel.GetUserDetails(); // Username var userDetails = (from c in db.SP_GR_Get_Userdetails(CurrentLoginUser.DisplayName) select c.user_roles).FirstOrDefault(); if (userDetails == null) { return RedirectToAction("NoAccess"); } var runResult = (from c in db.tbl_GR_Reports where c.Report_ID == id select c).SingleOrDefault(); DataSet ds = new DataSet(); DataTable dt = new DataTable(); if (runResult != null) { Microsoft.Practices.EnterpriseLibrary.Data.Database salesworldDbConn = new SqlDatabase(runResult.Db_Connection); DbCommand cmd = salesworldDbConn.GetSqlStringCommand(runResult.Query); try { ds = salesworldDbConn.ExecuteDataSet(cmd); } finally { cmd.Dispose(); salesworldDbConn = null; } if (ds != null && ds.Tables.Count > 0) { dt = ds.Tables[0]; } } return View(dt); } View Code: @model System.Data.DataTable@{ ViewBag.Title = "RunReport"; Layout = "~/Views/Shared/_Layout.cshtml";} $(document).ready(function () { $("#export").click(function (e) { var grid = $("#grid").data("kendoGrid"); grid.saveAsExcel(); e.preventDefault(); }); }); @(Html.Kendo().Grid(Model) .Name("grid") .Scrollable() .Columns(columns => { columns.AutoGenerate(column => { column.Width = "100px"; }); //columns.AutoGenerate(true); }) .HtmlAttributes(new { style = "width: 900px;" }) //.Scrollable() .Groupable() .Filterable() .Sortable(sortable => sortable.AllowUnsort(true).SortMode(GridSortMode.MultipleColumn)) //.Pageable(pageable => pageable // .PageSizes(true) // ) .Resizable(resize => resize.Columns(true)) .DataSource(dataSource => dataSource .Ajax() //.PageSize(20) .ServerOperation(false) ) ) Export to Excel 0NKneel k143 reputation11y agoPosted Jul 30, 2015, 7:06 AM EDT0I am trying this below link , I am struck in the middle . can any one help me. its very urgent. http://www.codeproject.com/Articles/19284/Export-large-data-from-Gridview-and-Datareader-to0Ramesh MaruthiRank #937 · 2.2K reputation11y agoPosted Jul 31, 2015, 6:17 AM EDT0 Hi Neelima, So in this line dt = ds.Tables[0] can you see 40 k records here ?? If your answer is yes Can you please see whether 10k records is also causing problem, by limiting your data-set to 10k as mentioned below . dt = ds.Tables[0];CodeCopydt = dt.AsEnumerable().Skip(0).Take(10000).CopyToDataTable(); 0NKneel k143 reputation11y agoPosted Aug 3, 2015, 9:33 AM EDT0first time 40,000 records loading correctly when i click 2nd page again loading 40,000 records and showing out of memory exception.0Syed ShanuRank #87 · 23.7K reputation11y agoPosted Aug 3, 2015, 5:06 PM EDT0Hi,Check this links hope this will help you. http://forums.asp.net/t/1971659.aspx?MVC+4+Entity+FrameWork+Large+Dataset+paging+kendo+grid http://stackoverflow.com/questions/13710246/kendo-ui-grid-with-large-data-set http://www.telerik.com/forums/virtual-scroll-paging 0Join to answer this questionEvery answer you publish earns 20 SHARP.Create free accountSign inKnow the answer?Answer a question in the forums and earn +20 SHARP for every answer.See unanswered questionsForumsTop experts01Arun PottiAnswers in the forums20answers02Tahir AnsariAnswers in the forums5answers03Kamlesh KumarAnswers in the forums5answers04Sam HobbsAnswers in the forums4answers05Željko PerićAnswers in the forums3answers?YouYour name goes here.Every answer: 20 SHARP.JoinFull leaderboard →2026DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
NKneel k143 reputation11y agoPosted Jul 30, 2015, 7:06 AM EDT0I am trying this below link , I am struck in the middle . can any one help me. its very urgent. http://www.codeproject.com/Articles/19284/Export-large-data-from-Gridview-and-Datareader-to0
Ramesh MaruthiRank #937 · 2.2K reputation11y agoPosted Jul 31, 2015, 6:17 AM EDT0 Hi Neelima, So in this line dt = ds.Tables[0] can you see 40 k records here ?? If your answer is yes Can you please see whether 10k records is also causing problem, by limiting your data-set to 10k as mentioned below . dt = ds.Tables[0];CodeCopydt = dt.AsEnumerable().Skip(0).Take(10000).CopyToDataTable(); 0
NKneel k143 reputation11y agoPosted Aug 3, 2015, 9:33 AM EDT0first time 40,000 records loading correctly when i click 2nd page again loading 40,000 records and showing out of memory exception.0
Syed ShanuRank #87 · 23.7K reputation11y agoPosted Aug 3, 2015, 5:06 PM EDT0Hi,Check this links hope this will help you. http://forums.asp.net/t/1971659.aspx?MVC+4+Entity+FrameWork+Large+Dataset+paging+kendo+grid http://stackoverflow.com/questions/13710246/kendo-ui-grid-with-large-data-set http://www.telerik.com/forums/virtual-scroll-paging 0
Ramesh MaruthiRank #937 · 2.2K reputationPosted Jul 29, 2015, 9:47 AM EDT
neel k143 reputationPosted Jul 29, 2015, 9:52 AM EDT
Ramesh MaruthiRank #937 · 2.2K reputationPosted Jul 30, 2015, 5:11 AM EDT
neel k143 reputationPosted Jul 30, 2015, 5:13 AM EDT
neel k143 reputationPosted Jul 30, 2015, 7:06 AM EDT
Ramesh MaruthiRank #937 · 2.2K reputationPosted Jul 31, 2015, 6:17 AM EDT
neel k143 reputationPosted Aug 3, 2015, 9:33 AM EDT
Syed ShanuRank #87 · 23.7K reputationPosted Aug 3, 2015, 5:06 PM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts