System.ArgumentNullException: 值不能为空。范围

System.ArgumentNullException: Value cannot be null. Paramete

iam 使用 mvc5.2 和 stimulsoft 2014.3 时 运行 这看到错误: 说明:在执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其在代码中的来源的详细信息。

异常详细信息:System.ArgumentNullException:值不能为空。 参数名称:key

Source Error:

Line 7: Line 8:
@Html.Stimulsoft().RenderMvcViewerScripts() Line 9:
@Html.Stimulsoft().StiMvcViewer("MyViewr", new StiMvcViewerOptions() Line 10: { Line 11: ActionGetReportSnapshot = "FromLoadFileReport",

    @Html.Stimulsoft().StiMvcViewer("MyViewr", new StiMvcViewerOptions()
  {
      ActionGetReportSnapshot = "FromLoadFileReport",
      ActionViewerEvent = "ViewerEvent",
      Width = Unit.Percentage(100)
      //Theme = StiTheme.Office2007Black,
      //ActionPrintReport = "PrintReport",
      //ActionExportReport = "ExportReport",
      //ToolbarBackgroundColor = System.Drawing.Color.Silver



  StiReport report = new StiReport();
        string Path = Server.MapPath("~" + ("/Web/Areas/RepUser/HistoryJob.mrt"));
        report.Load(Path);
        report.Compile();

        return StiMvcViewer.GetReportSnapshotResult(HttpContext, report);

您应该在 Web.config 文件中添加下一部分:

  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.1" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

stimulsoft 2014 不支持 MVC5。 你应该下载 Stimulsoft 2015.2.

刺激软件 Reports.Web 2014.1 该版本产品兼容.NET Framework 2.0 - 3.5

Stimulsoft Reports.Web 2015.2 正式版 安装包包含安装或卸载产品以及 运行 安装用户界面的所有内容。本产品兼容 Visual Studio 2010 - 2015 和 .NET Framework 4.0 或更高版本。

https://www.stimulsoft.com/en/downloads/reports-web https://www.stimulsoft.com/en/changes/reports-web?build=2015.2