C# 为什么我的ASP.NET MVC剑道网格无法通过网络传输大数据?

C# 为什么我的ASP.NET MVC剑道网格无法通过网络传输大数据?,c#,asp.net-mvc,json,kendo-grid,fiddler,C#,Asp.net Mvc,Json,Kendo Grid,Fiddler,我有一个用于ASP.NET MVC的带包装器的剑道网格。当数据库在我的笔记本电脑中时,它甚至返回30000行。但是,当数据库位于远程系统中时,它只能用于15000行。除此之外,FiddlerGetresponse显示一个空的JSON集。网络上的JSON数据是否存在瓶颈 这是我的控制器类中的代码: public JsonResult Get([DataSourceRequest]DataSourceRequest request) { myStartDat

我有一个用于ASP.NET MVC的带包装器的剑道网格。当数据库在我的笔记本电脑中时,它甚至返回30000行。但是,当数据库位于远程系统中时,它只能用于15000行。除此之外,Fiddler
Get
response显示一个空的JSON集。网络上的JSON数据是否存在瓶颈

这是我的控制器类中的代码:

public JsonResult Get([DataSourceRequest]DataSourceRequest request)
        {

            myStartDate = (DateTime)Session["myStartDate"];
            myEndDate = (DateTime)Session["myEndDate"];

            // SP query to select products and map to model objects
            var products = ConvertOutputOfAdminAssociateSPToAList(myStartDate,myEndDate);

            Session["ProductionList"] = products;

            // convert to a DataSourceResponse and send back as JSON
            return this.Json(products.ToDataSourceResult(request));
        }
这里是风景

@(Html.Kendo().Grid<Production>().Name("Production").Columns(c => {

    c.Bound(p => p.DateProcessed).Title("Processed").Format("{0:MM-dd-yyyy}").ClientFooterTemplate("Total Count: #=count#")
            .ClientGroupFooterTemplate("Count: #=count#");
    c.Bound(p => p.ReceiptDate).Title("Received").Format("{0:MM-dd-yyyy}");
    c.Bound(p => p.ClaimNo);
    c.Bound(p => p.Associate);
    c.Bound(p => p.ProcessLevel).Title("Level");
    c.Bound(p => p.NoOfLines).Title("Lines").ClientFooterTemplate("Sum: #=sum#")
                .ClientGroupFooterTemplate("Sum: #=sum#").ClientFooterTemplate("Average: #= kendo.toString(average,'0.00') #")
                .ClientGroupFooterTemplate("Average: #= kendo.toString(average,'0.00') #");
    c.Bound(p => p.Auditor);
    c.Bound(p => p.Manufacturer);
    c.Bound(p => p.ClaimantName).Title("Claimant");
    c.Bound(p => p.ClaimStatus).Title("Status");
    c.Bound(p => p.FTR);
    c.Bound(p => p.Remarks);
    c.Bound(p => p.RequestedAmount).Title("Amount").Format("{0:n2}") .ClientFooterTemplate("Sum: #=sum#")
                .ClientGroupFooterTemplate("Sum: #=sum#");
    c.Bound(p => p.Error);
    })
    .DataSource(d => d
        .Ajax()
        .Read(r => r.Action("Get", "Production"))
        .PageSize(8)
        .Aggregates(aggregates =>
                                                  {
                                                      aggregates.Add(p => p.DateProcessed).Count();
                                                      aggregates.Add(p => p.NoOfLines).Sum();
                                                      aggregates.Add(p => p.NoOfLines).Average();
                                                      aggregates.Add(p => p.RequestedAmount).Sum();

                                                  })
    )
    .ToolBar(toolBar => 
                    toolBar.Custom()
                        .Text("Export To CSV")
                        .HtmlAttributes(new { id = "export" })
                        .Url(Url.Action("Export", "Production", new { page = 1, pageSize = "~", filter = "~", sort = "~" }))
    )
    .Events(ev => ev.DataBound("onDataBound"))
    .Pageable()
    .Groupable()
    .Sortable()
    .Filterable()

)
@(Html.Kendo().Grid().Name(“Production”).Columns(c=>{
c、 绑定(p=>p.DateProcessed).Title(“已处理”).Format(“{0:MM dd yyyy}”).ClientFooterTemplate(“总计数:#=计数#”)
.ClientGroupFooterTemplate(“计数:#=计数#”);
c、 绑定(p=>p.ReceiptDate).Title(“Received”).Format(“{0:MM dd yyyy}”);
c、 约束(p=>p.ClaimNo);
c、 束缚(p=>p.Associate);
c、 绑定(p=>p.ProcessLevel).Title(“级别”);
c、 绑定(p=>p.NoOfLines).Title(“行”).ClientFooterTemplate(“Sum:#=Sum#”)
.ClientGroupFooterTemplate(“Sum:#=Sum#”).ClientFooterTemplate(“Average:#=kendo.toString(Average,'0.00')#”)
.ClientGroupFooterTemplate(“平均值:#=kendo.toString(平均值,'0.00')#”);
c、 约束(p=>p.Auditor);
c、 绑定(p=>p.Manufacturer);
c、 绑定(p=>p.ClaimentName)。标题(“索赔人”);
c、 绑定(p=>p.ClaimStatus)。标题(“状态”);
c、 界限(p=>p.FTR);
c、 约束(p=>p.备注);
c、 绑定(p=>p.RequestedAmount).Title(“Amount”).Format(“{0:n2}”).ClientFooterTemplate(“Sum:#=Sum#”)
.ClientGroupFooterTemplate(“Sum:#=Sum#”);
c、 界限(p=>p.Error);
})
.DataSource(d=>d
.Ajax()
.Read(r=>r.Action(“Get”,“Production”))
.页面大小(8)
.聚合(聚合=>
{
aggregates.Add(p=>p.DateProcessed.Count();
aggregates.Add(p=>p.NoOfLines.Sum();
aggregates.Add(p=>p.NoOfLines.Average();
aggregates.Add(p=>p.RequestedAmount.Sum();
})
)
.ToolBar(ToolBar=>
toolBar.Custom()
.Text(“导出到CSV”)
.HtmlAttributes(新的{id=“导出”})
.Url(Url.Action(“导出”、“生产”,新建{page=1,pageSize=“~”,filter=“~”,sort=“~”}))
)
.Events(ev=>ev.DataBound(“onDataBound”))
.Pageable()
.Groupable()
.Sortable()
.可过滤()
)

我从不需要调整任何jsonSerialization配置设置

给你

@(Html.Kendo().Grid<Production>() 
您可以将其用于分页等…因此

@(Html.Kendo().Grid<Production>()
    .Name("Production")
    .Scrollable(scrollable => scrollable.Virtual(true))
    .Columns(c => {

c.Bound(p => p.DateProcessed).Title("Processed").Format("{0:MM-dd-yyyy}").ClientFooterTemplate("Total Count: #=count#")
        .ClientGroupFooterTemplate("Count: #=count#");
c.Bound(p => p.ReceiptDate).Title("Received").Format("{0:MM-dd-yyyy}");
c.Bound(p => p.ClaimNo);
c.Bound(p => p.Associate);
c.Bound(p => p.ProcessLevel).Title("Level");
c.Bound(p => p.NoOfLines).Title("Lines").ClientFooterTemplate("Sum: #=sum#")
            .ClientGroupFooterTemplate("Sum: #=sum#").ClientFooterTemplate("Average: #= kendo.toString(average,'0.00') #")
            .ClientGroupFooterTemplate("Average: #= kendo.toString(average,'0.00') #");
c.Bound(p => p.Auditor);
c.Bound(p => p.Manufacturer);
c.Bound(p => p.ClaimantName).Title("Claimant");
c.Bound(p => p.ClaimStatus).Title("Status");
c.Bound(p => p.FTR);
c.Bound(p => p.Remarks);
c.Bound(p => p.RequestedAmount).Title("Amount").Format("{0:n2}") .ClientFooterTemplate("Sum: #=sum#")
            .ClientGroupFooterTemplate("Sum: #=sum#");
c.Bound(p => p.Error);
})
.DataSource(d => d
    .Ajax()
    .Read(r => r.Action("Get", "Production"))
    .PageSize(8)
    .Aggregates(aggregates =>
                                              {
                                                  aggregates.Add(p => p.DateProcessed).Count();
                                                  aggregates.Add(p => p.NoOfLines).Sum();
                                                  aggregates.Add(p => p.NoOfLines).Average();
                                                  aggregates.Add(p => p.RequestedAmount).Sum();

                                              })
)
.ToolBar(toolBar => 
                toolBar.Custom()
                    .Text("Export To CSV")
                    .HtmlAttributes(new { id = "export" })
                    .Url(Url.Action("Export", "Production", new { page = 1, pageSize = "~", filter = "~", sort = "~" }))
)
.Events(ev => ev.DataBound("onDataBound"))
.Pageable()
.Groupable()
.Sortable()
.Filterable()
@(Html.Kendo().Grid())
.名称(“生产”)
.Scrollable(Scrollable=>Scrollable.Virtual(true))
.列(c=>{
c、 绑定(p=>p.DateProcessed).Title(“已处理”).Format(“{0:MM dd yyyy}”).ClientFooterTemplate(“总计数:#=计数#”)
.ClientGroupFooterTemplate(“计数:#=计数#”);
c、 绑定(p=>p.ReceiptDate).Title(“Received”).Format(“{0:MM dd yyyy}”);
c、 约束(p=>p.ClaimNo);
c、 束缚(p=>p.Associate);
c、 绑定(p=>p.ProcessLevel).Title(“级别”);
c、 绑定(p=>p.NoOfLines).Title(“行”).ClientFooterTemplate(“Sum:#=Sum#”)
.ClientGroupFooterTemplate(“Sum:#=Sum#”).ClientFooterTemplate(“Average:#=kendo.toString(Average,'0.00')#”)
.ClientGroupFooterTemplate(“平均值:#=kendo.toString(平均值,'0.00')#”);
c、 约束(p=>p.Auditor);
c、 绑定(p=>p.Manufacturer);
c、 绑定(p=>p.ClaimentName)。标题(“索赔人”);
c、 绑定(p=>p.ClaimStatus)。标题(“状态”);
c、 界限(p=>p.FTR);
c、 约束(p=>p.备注);
c、 绑定(p=>p.RequestedAmount).Title(“Amount”).Format(“{0:n2}”).ClientFooterTemplate(“Sum:#=Sum#”)
.ClientGroupFooterTemplate(“Sum:#=Sum#”);
c、 界限(p=>p.Error);
})
.DataSource(d=>d
.Ajax()
.Read(r=>r.Action(“Get”,“Production”))
.页面大小(8)
.聚合(聚合=>
{
aggregates.Add(p=>p.DateProcessed.Count();
aggregates.Add(p=>p.NoOfLines.Sum();
aggregates.Add(p=>p.NoOfLines.Average();
aggregates.Add(p=>p.RequestedAmount.Sum();
})
)
.ToolBar(ToolBar=>
toolBar.Custom()
.Text(“导出到CSV”)
.HtmlAttributes(新的{id=“导出”})
.Url(Url.Action(“导出”、“生产”,新建{page=1,pageSize=“~”,filter=“~”,sort=“~”}))
)
.Events(ev=>ev.DataBound(“onDataBound”))
.Pageable()
.Groupable()
.Sortable()
.可过滤()

)

检查maxRequestimeout的配置,它可能会在获取数据之前放弃连接。@ArindamNayak我找不到任何类似的设置。SSRS报告在同一个数据库上工作并提供大量数据。请检查-,它是
maxexecutiontimeout
-它特定于发生json事件的web应用程序。这有助于我尝试并返回。
@(Html.Kendo().Grid<Production>()
    .Name("Production")
    .Scrollable(scrollable => scrollable.Virtual(true))
    .Columns(c => {

c.Bound(p => p.DateProcessed).Title("Processed").Format("{0:MM-dd-yyyy}").ClientFooterTemplate("Total Count: #=count#")
        .ClientGroupFooterTemplate("Count: #=count#");
c.Bound(p => p.ReceiptDate).Title("Received").Format("{0:MM-dd-yyyy}");
c.Bound(p => p.ClaimNo);
c.Bound(p => p.Associate);
c.Bound(p => p.ProcessLevel).Title("Level");
c.Bound(p => p.NoOfLines).Title("Lines").ClientFooterTemplate("Sum: #=sum#")
            .ClientGroupFooterTemplate("Sum: #=sum#").ClientFooterTemplate("Average: #= kendo.toString(average,'0.00') #")
            .ClientGroupFooterTemplate("Average: #= kendo.toString(average,'0.00') #");
c.Bound(p => p.Auditor);
c.Bound(p => p.Manufacturer);
c.Bound(p => p.ClaimantName).Title("Claimant");
c.Bound(p => p.ClaimStatus).Title("Status");
c.Bound(p => p.FTR);
c.Bound(p => p.Remarks);
c.Bound(p => p.RequestedAmount).Title("Amount").Format("{0:n2}") .ClientFooterTemplate("Sum: #=sum#")
            .ClientGroupFooterTemplate("Sum: #=sum#");
c.Bound(p => p.Error);
})
.DataSource(d => d
    .Ajax()
    .Read(r => r.Action("Get", "Production"))
    .PageSize(8)
    .Aggregates(aggregates =>
                                              {
                                                  aggregates.Add(p => p.DateProcessed).Count();
                                                  aggregates.Add(p => p.NoOfLines).Sum();
                                                  aggregates.Add(p => p.NoOfLines).Average();
                                                  aggregates.Add(p => p.RequestedAmount).Sum();

                                              })
)
.ToolBar(toolBar => 
                toolBar.Custom()
                    .Text("Export To CSV")
                    .HtmlAttributes(new { id = "export" })
                    .Url(Url.Action("Export", "Production", new { page = 1, pageSize = "~", filter = "~", sort = "~" }))
)
.Events(ev => ev.DataBound("onDataBound"))
.Pageable()
.Groupable()
.Sortable()
.Filterable()