This question is locked. New answers and comments are not allowed.
Error: The Requested URL Returned 500 - Internal Server Error
Version: 2010.2.825.235
I get the 500 Internal Server Error on an AJAX Bound grid doing an insert only.
See code below:
The GetViewData call gets the items needed for a combo box:
I have stepped through every line of the code up to and including the "GetAll()" that gets called to pass the items back to the grid and there are no errors on the whole trip. I've checked the collection that gets returned to the grid and there is no invalid or duplicate data. There's nothing that would cause an exception.
There are no circular references as my item uses only basic .NET types. It's a View Model that is created separately (I'm not using EF anyways).
The kicker is, the item ACTUALLY INSERTS, but the grid throws the error and it stays in Edit mode. I can select, update, and delete the same item that was inserted that threw an error and I have no issues.
The ScriptManager is at the BOTTOM of the Site.Master right before the last </body> tag.
This only happens on insert.
Does anyone have any suggestions?
Version: 2010.2.825.235
I get the 500 Internal Server Error on an AJAX Bound grid doing an insert only.
See code below:
[AcceptVerbs(HttpVerbs.Post)] [GridAction] public ActionResult _InsertAjaxEditing() { var model = new SpecialEventViewModel(); //Perform model binding (fill the product properties and validate it). if (TryUpdateModel(model)) { //The model is valid - insert the product. _service.Save(model); } GetViewData(); //Rebind the grid return View(_service.GetAll()); }The GetViewData call gets the items needed for a combo box:
public void GetViewData() { ViewData[ViewDataKeys.Locations] = new SelectList(_locService.GetAll(), "CommitteeLocationId", "LocationName"); }I have stepped through every line of the code up to and including the "GetAll()" that gets called to pass the items back to the grid and there are no errors on the whole trip. I've checked the collection that gets returned to the grid and there is no invalid or duplicate data. There's nothing that would cause an exception.
There are no circular references as my item uses only basic .NET types. It's a View Model that is created separately (I'm not using EF anyways).
The kicker is, the item ACTUALLY INSERTS, but the grid throws the error and it stays in Edit mode. I can select, update, and delete the same item that was inserted that threw an error and I have no issues.
The ScriptManager is at the BOTTOM of the Site.Master right before the last </body> tag.
This only happens on insert.
Does anyone have any suggestions?