Asp.net mvc ';系统异常';使用Stimulsoft时

Asp.net mvc ';系统异常';使用Stimulsoft时,asp.net-mvc,asp.net-mvc-5,stimulsoft,Asp.net Mvc,Asp.net Mvc 5,Stimulsoft,我正在尝试在我的MVC 5.2应用程序中使用Stimulsoft Reports 2014.3。当我尝试使用@Html.Stimulsoft().StiMvcViewer时,出现以下异常 mscorlib.dll中发生“System.ArgumentNullException”类型的异常 值不能为null。参数名称:key 我可以很好地使用@Html.Stimulsoft().StiMvcViewerFx。我曾尝试在web.config中进行各种更改以避免此异常,但都没有用。我还尝试了Debug

我正在尝试在我的MVC 5.2应用程序中使用Stimulsoft Reports 2014.3。当我尝试使用
@Html.Stimulsoft().StiMvcViewer
时,出现以下异常

mscorlib.dll中发生“System.ArgumentNullException”类型的异常

值不能为null。参数名称:key

我可以很好地使用
@Html.Stimulsoft().StiMvcViewerFx
。我曾尝试在web.config中进行各种更改以避免此异常,但都没有用。我还尝试了Debug->Exceptions,并在这两个框中都选中了公共语言运行时异常,但没有任何其他异常

添加
@Html.Stimulsoft()

这是一种观点:

@using Stimulsoft.Report.Mvc
@using System.Web.UI.WebControls
@model Models.GenericReportViewModel

<div>
    @Html.Stimulsoft().StiMvcViewer(new StiMvcViewerOptions()
{
    ActionGetReportSnapshot = string.Concat("LoadReport?Id=", Model.ReportName),
    Width = Unit.Point(500),
    Theme = StiTheme.Default,
    ActionExportReport = "ExportReport",
    Height = Unit.Point(400),
    Controller = "Report",
})
</div>
添加此选项将抑制异常并阻止页面呈现,可能是因为我没有使用MVC 3!但这应该与此有关


我还将此重定向设置为
oldVersion=“0.0.0.0-5.2.3.0”newVersion=“5.2.3.0”
,但我将得到此重定向的例外情况。

在web.config的appsettings中添加此行

<add key="PageInspector:ServerCodeMappingSupport" value="Disabled" />

可能您的报告文件是使用不同版本的Stimulsoft创建的

@using Stimulsoft.Report.Mvc
@using System.Web.UI.WebControls
@model Models.GenericReportViewModel

<div>
    @Html.Stimulsoft().RenderMvcViewerFxScripts()
    @Html.Stimulsoft().StiMvcViewerFx(new StiMvcViewerFxOptions()
{
    ActionGetReportSnapshot = string.Concat("LoadReport?Id=", Model.ReportName),
    Width = Unit.Point(500),
    Theme = StiMvcViewerFxOptions.Themes.Blue,
    ActionExportReport = "ExportReport",
    BackgroundColor = System.Drawing.Color.Silver,
    ActionGetLocalization = "GetLocal",
    Height = Unit.Point(400),
    Controller = "Report",
})
</div>
  <dependentAssembly>
    <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
    <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.1" />
  </dependentAssembly>
<add key="PageInspector:ServerCodeMappingSupport" value="Disabled" />