You will see this error if you try to open the backend URL in a browser.
In order to show the Calendar you need two URLs (corresponding to two controller actions):
1. The first one will show a view with the Calendar control on it:
Controller:
[HandleError]
public class CalendarController : Controller
{
public ActionResult Light()
{
return View();
}
...
}
View:
...
@Html.DayPilotCalendar("dpc", new DayPilotCalendarConfig
{
BackendUrl = Url.Content("~/Calendar/Backend"),
})
...
Example:
http://mvc.daypilot.org/demo/Lite/Calendar/Light
2. The second one handles the AJAX requests generated by the view (#1). It has no view associated with it and it's not possible to open in directly in the browser. You need to use this url as BackendUrl in the view (#1).
...
public ActionResult Backend()
{
return new Dpc().CallBack(this);
}
...
Example:
http://mvc.daypilot.org/demo/Lite/Calendar/Backend
See also this article for a step-by-step description of the event calendar setup:
http://kb.daypilot.org/67316/how-to-show-an-event-calendar-in-asp-net-mvc-3-razor/