'System.StackOverflowException' 类型的未处理异常发生在 mscorlib.dll asp.net-mvc
An unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll asp.net-mvc
我在 ASP.NET MVC 应用程序的视图中收到以下运行时错误:
An unhandled exception of type 'System.WhosebugException' occurred in mscorlib.dll
就在return View();
之前一切都很好。在视图中我几乎没有任何代码:
@{
ViewBag.Title = "Test";
}
@(Html.EJ().Schedule("Schedule1",
(Syncfusion.JavaScript.Models.ScheduleProperties)ViewBag.Model))
但是正是这一行抛出了异常。我也没有在 ViewBag.Model
中看到任何可疑的东西。
如何调试这个错误?堆栈跟踪为空。
Syncfusion support forum 上的这个帖子表明问题是由于启用了非侵入式验证引起的。如果您可以禁用它,那可能是您最好的选择。否则,他们提出了这个相当冗长的解决方法:
@(Html.EJ().Schedule("Schedule1")
.Width("100%")
.Height("525px")
.CurrentDate(new DateTime(2014, 6, 1))
.ScheduleClientSideEvents(even=>even.CellClick("onCellQuickWindowClose").AppointmentClick("onAppQuickWindowClose"))
.CategorizeSettings(Fields => Fields.Datasource((System.Collections.IEnumerable)ViewBag.categorize).Enable(true).AllowMultiple(false).Id("id").Text("text").Color("color").FontColor("fontColor"))
.ContextMenuSettings(menu => menu.Enable(true).MenuItems(item => item.Cells(ViewBag.cell).Appointment(ViewBag.app)))
.AppointmentSettings(fields => fields.Datasource((System.Collections.IEnumerable)ViewBag.datasource)
.Id("Id")
.Subject("Subject")
.StartTime("StartTime")
.EndTime("EndTime")
.Description("Description")
.AllDay("AllDay")
.Recurrence("Recurrence")
.RecurrenceRule("RecurrenceRule")
.Categorize("Categorize"))
)
<script type="text/javascript">
function onCellQuickWindowClose(args) {
var dialog = $("#Schedule1AppointmentQuickWindow").data("ejDialog");
dialog.close(); // Here we are closing the quick appointment window
}
function onAppQuickWindowClose(args) {
var dialog = $("#Schedule1AppDetailsWindow").data("ejDialog");
dialog.close(); // Here we are closing the quick appointment window
}
</script>
该线程还提供以下下载link以获取上面显示的代码:
http://www.syncfusion.com/downloads/support/directtrac/general/ScheduleNuget-2089236857.zip
我在 ASP.NET MVC 应用程序的视图中收到以下运行时错误:
An unhandled exception of type 'System.WhosebugException' occurred in mscorlib.dll
就在return View();
之前一切都很好。在视图中我几乎没有任何代码:
@{
ViewBag.Title = "Test";
}
@(Html.EJ().Schedule("Schedule1",
(Syncfusion.JavaScript.Models.ScheduleProperties)ViewBag.Model))
但是正是这一行抛出了异常。我也没有在 ViewBag.Model
中看到任何可疑的东西。
如何调试这个错误?堆栈跟踪为空。
Syncfusion support forum 上的这个帖子表明问题是由于启用了非侵入式验证引起的。如果您可以禁用它,那可能是您最好的选择。否则,他们提出了这个相当冗长的解决方法:
@(Html.EJ().Schedule("Schedule1")
.Width("100%")
.Height("525px")
.CurrentDate(new DateTime(2014, 6, 1))
.ScheduleClientSideEvents(even=>even.CellClick("onCellQuickWindowClose").AppointmentClick("onAppQuickWindowClose"))
.CategorizeSettings(Fields => Fields.Datasource((System.Collections.IEnumerable)ViewBag.categorize).Enable(true).AllowMultiple(false).Id("id").Text("text").Color("color").FontColor("fontColor"))
.ContextMenuSettings(menu => menu.Enable(true).MenuItems(item => item.Cells(ViewBag.cell).Appointment(ViewBag.app)))
.AppointmentSettings(fields => fields.Datasource((System.Collections.IEnumerable)ViewBag.datasource)
.Id("Id")
.Subject("Subject")
.StartTime("StartTime")
.EndTime("EndTime")
.Description("Description")
.AllDay("AllDay")
.Recurrence("Recurrence")
.RecurrenceRule("RecurrenceRule")
.Categorize("Categorize"))
)
<script type="text/javascript">
function onCellQuickWindowClose(args) {
var dialog = $("#Schedule1AppointmentQuickWindow").data("ejDialog");
dialog.close(); // Here we are closing the quick appointment window
}
function onAppQuickWindowClose(args) {
var dialog = $("#Schedule1AppDetailsWindow").data("ejDialog");
dialog.close(); // Here we are closing the quick appointment window
}
</script>
该线程还提供以下下载link以获取上面显示的代码:
http://www.syncfusion.com/downloads/support/directtrac/general/ScheduleNuget-2089236857.zip