This is a migrated thread and some comments may be shown as answers.

Issue with LoadContentFrom in Window

3 Answers 347 Views
Window
This is a migrated thread and some comments may be shown as answers.
Jacob
Top achievements
Rank 1
Jacob asked on 20 Nov 2012, 07:35 PM
I was trying to use the LoadContentFrom() of Kendo Window like this:

Html.Kendo().Window()
	   .Name("time-hierarchy-edit-window")
	   .Title("Add or Edit Leafs")
	   .LoadContentFrom("/Hierarchies/EditTimeHierarchyNodes?hierarchyID=" + Request.QueryString["hierarchyID"])
	   .Draggable()
		.Width(500)
		.Render();

And I have the action method in controller:

public ActionResult EditTimeHierarchyNodes(Guid hierarchyID)
		{
			EditTimeHierarchyNodesViewModel model = new EditTimeHierarchyNodesViewModel() {
				Hierarchy = m_timeHierarchyRepository.GetTimeHierarchy(hierarchyID),
				LeafNodeGroups = m_timeNodeRepository.GetLeafNodeGroups(hierarchyID),
			};
 
			return View();
		}
However, when the ajax request came back, it gave me 500 error "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." The issue is that the View() does not have any overload that allows me to specify the AllowGet option. Can any one shine some light on this? Thanks.

3 Answers, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 23 Nov 2012, 08:45 AM
Hello Jacob,

Usually the error you pasted is thrown when when you are trying to access an action method which returns JSON with GET request.
http://forums.asp.net/t/1483387.aspx/1?JSON+Problem+JsonRequestBehavior+to+AllowGet+

We are not sure how this issue is thrown from such controller which returns a View.

Could you share a project which reproduces that problem?

Kind Regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
mark
Top achievements
Rank 1
answered on 04 Feb 2014, 03:49 AM
Petur,

I have exactly the same issue as the original poster (500 error). 

The only point of difference I can see is that I am using MVC3 (which I can't change).  Apart from that it's as per the examples (window -> controller returning a View() or PartialView())

Just wondering if there is a solution / workaround to this issue you can share?
0
mark
Top achievements
Rank 1
answered on 04 Feb 2014, 04:59 AM
Not to worry - I've solved it.  The problem was that any error with rendering the View() results in this ambiguous error.

In my case I simply had the View in the incorrect folder.
Tags
Window
Asked by
Jacob
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
mark
Top achievements
Rank 1
Share this question
or