Read return error 500

2 posts, 0 answers
  1. Erich Čonka
    Erich Čonka avatar
    10 posts
    Member since:
    Oct 2009

    Posted 10 Oct 2017 Link to this post


    I have defined datasource read actions in grid (not only grid):

    .DataSource(dataSource => dataSource
                .Read(read => read.Action("ReadAction", "Controller").Type(HttpVerbs.Post))

    This return in network error 500: This request has been blocked because sensitive information could be disclosed to third party web sites when this is used in a GET request. To allow GET requests, set JsonRequestBehavior to AllowGet. 

    public JsonResult ReadAction([DataSourceRequest] DataSourceRequest request)

    return Json(list.ToDataSourceResult(request))


    I don't know why, because this applications I have published on 4 servers. On 3 server is all right and on the fourth server I have this problem. 
    It's not problem only with grid component. This problem I have with treelist, treeview, ... 

    If I changed return in method in controller and I added JsonRequestBehavior.AllowGet (return Json(list.ToDataSourceResult(request))) than it's ok. But I want to use POST request. 
    Why it doesn't work on 1 server ?
    Where could be the problem ?


  2. Stefan
    Stefan avatar
    3068 posts

    Posted 12 Oct 2017 Link to this post

    Hello, Ján,

    Thank you for the information.

    In general, this error occurs for security reasons, and it is connected to the MVC framework. The difference may be coming from the difference MVC version or .NET framework version.

    Also, if the type is set to POST, the Grid should make post requests, Please ensure that the error is not caused by a different request which is GET. Please inspect the network tab to check the request type.

    Additionally, it is recommended to add the AllowsGet behavior like this:

    return Json(list.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);

    If the issue still occurs, please provide more details and I will gladly assist.

    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top