I am using Telerik Grid for Aspnet Core 2.0, but here my Actionresult "[DataSourceRequest]" can't be called, the browser says error message "The connection was reset".
Please find my code below:
Index.cshtml
-----------------
@(Html.Kendo().Grid<MVC6.Models.Blog>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(c => c.Title).Width(140);
columns.Bound(c => c.Description).Width(190);
})
.HtmlAttributes(new { style = "height: 380px;" })
.Scrollable()
.Groupable()
.Sortable()
.Pageable(pageable => pageable
.Refresh(true)
.PageSizes(true)
.ButtonCount(5))
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("Customers_Read", "Blogs"))
)
)
BlogController.cs
-----------------------------------
// GET: Blogs
public async Task<IActionResult> Index()
{
return View("~/Views/Home/Index1.cshtml");
}
public IActionResult Customers_Read([DataSourceRequest] DataSourceRequest request)
{
return Json(GetBlogs().ToDataSourceResult(request));
}
private IEnumerable<Blog> GetBlogs()
{
return _context.Blog.Select(blog => new Blog
{
Title = blog.Title,
Description = blog.Description
}).ToList();
}
5 Answers, 1 is accepted
Thank you for the provided information.
Based on the provided details and the error, it seems that the issue is not directly related to the Kendo UI Grid.
The issue is more likely to be caused by the internet options:
https://support.mozilla.org/en-US/questions/1056868
https://www.bleepingcomputer.com/forums/t/564444/getting-the-connection-was-reset-errors-across-multiple-browsers/
If the issue still persists, please check it on another network to observe if the issue is network specific.
Regards,
Stefan
Progress Telerik

Thanks for your response, But i 'd like to tell you the same thing above i have applied in Asp.net Core 1.0 and it is working well. The same code is not working in Asp.Net Core 2.0. It seems like the Action "Customers_Read" with "[DataSourceRequest" can not be called from view side code. So, i think there is a bug.
I made an application using IActionResult with DataSourceRequest and ASP.NET Core 2 which is working as expected on my end.
If the issue is introduced after switching to version 2.0, please ensure that the latest version of the widgets is used as the Core 2 support was introduced in the latest releases.
If the issue still occurs after updating to the latest version, please provide an example which we can test locally and inspect it further.
Regards,
Stefan
Progress Telerik

Hi,
I am not able to run even a project.
Can you please provide running solution? I am using VS2017 Core 2.0.
Getting below errors:
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'System' could not be found (are you missing a using directive or an assembly reference?) KendoUiGridCore2 E:\Harsh\Demo\4a62fed4-4e1d-4457-8bdd-29d3676a125d_KendoUiGridCore2\KendoUiGridCore2\KendoUiGridCore2\Controllers\GridController.cs 1 Active
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'Microsoft' could not be found (are you missing a using directive or an assembly reference?) KendoUiGridCore2 E:\Harsh\Demo\4a62fed4-4e1d-4457-8bdd-29d3676a125d_KendoUiGridCore2\KendoUiGridCore2\KendoUiGridCore2\Controllers\GridController.cs 5 Active
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'DataSourceRequestAttribute' could not be found (are you missing a using directive or an assembly reference?) KendoUiGridCore2 E:\Harsh\Demo\4a62fed4-4e1d-4457-8bdd-29d3676a125d_KendoUiGridCore2\KendoUiGridCore2\KendoUiGridCore2\Controllers\GridController.cs 14 Active
Severity Code Description Project File Line Suppression State
Error CS0518 Predefined type 'System.Object' is not defined or imported KendoUiGridCore2 E:\Harsh\Demo\4a62fed4-4e1d-4457-8bdd-29d3676a125d_KendoUiGridCore2\KendoUiGridCore2\KendoUiGridCore2\Controllers\GridController.cs 14 Active
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'Microsoft' could not be found (are you missing a using directive or an assembly reference?) KendoUiGridCore2 E:\Harsh\Demo\4a62fed4-4e1d-4457-8bdd-29d3676a125d_KendoUiGridCore2\KendoUiGridCore2\KendoUiGridCore2\Controllers\HomeController.cs 5 Active
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'Controller' could not be found (are you missing a using directive or an assembly reference?) KendoUiGridCore2 E:\Harsh\Demo\4a62fed4-4e1d-4457-8bdd-29d3676a125d_KendoUiGridCore2\KendoUiGridCore2\KendoUiGridCore2\Controllers\HomeController.cs 9 Active
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'IActionResult' could not be found (are you missing a using directive or an assembly reference?) KendoUiGridCore2 E:\Harsh\Demo\4a62fed4-4e1d-4457-8bdd-29d3676a125d_KendoUiGridCore2\KendoUiGridCore2\KendoUiGridCore2\Controllers\HomeController.cs 11 Active
Severity Code Description Project File Line Suppression State
Error CS0103 The name 'Enumerable' does not exist in the current context KendoUiGridCore2 E:\Harsh\Demo\4a62fed4-4e1d-4457-8bdd-29d3676a125d_KendoUiGridCore2\KendoUiGridCore2\KendoUiGridCore2\Controllers\GridController.cs 16 Active
Severity Code Description Project File Line Suppression State
Error CS0518 Predefined type 'System.Int32' is not defined or imported KendoUiGridCore2 E:\Harsh\Demo\4a62fed4-4e1d-4457-8bdd-29d3676a125d_KendoUiGridCore2\KendoUiGridCore2\KendoUiGridCore2\Controllers\GridController.cs 16 Active
Severity Code Description Project File Line Suppression State
Error Assets file 'E:\Harsh\Demo\4a62fed4-4e1d-4457-8bdd-29d3676a125d_KendoUiGridCore2\KendoUiGridCore2\KendoUiGridCore2\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. KendoUiGridCore2 C:\Program Files\dotnet\sdk\2.0.3\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets 323
I tested the same zip file on different machines and it was able to open as expected.
It may occur if the Telerik ASP.NET Core VsExtensions are not installed. Please install than a try rebuilding the solution after that.
As the original issue is different, could you please share with us the project that has the issue described initially in the ticket, so we can inspect it and check if we can offer a suggestion that will focus on that.
Regards,
Stefan
Progress Telerik