我有一個在本地運行沒有任何問題的刺激報告,但在 IIS 中出現以下錯誤
拒絕訪問路徑“Stimulsoft”。
System.UnauthorizedAccessException:對路徑“Stimulsoft”的訪問被拒絕。
源錯誤:第 6 行
Line 4: }
Line 5:
Line 6: @Html.Stimulsoft().StiMvcViewer(options: new StiMvcViewerOptions()
Line 7: {
Line 8: Actions =
控制器中的代碼:
public ActionResult report()
{
var report = new StiReport();
report.Load(Server.MapPath("~/Content/SalaryReport.mrt"));
report.Compile();
查看中的代碼:
@using Stimulsoft.Report.Mvc;
@{
ViewBag.Title = "Print";
}
@Html.Stimulsoft().StiMvcViewer(options: new StiMvcViewerOptions()
{
Actions =
{
GetReport = "report",
ViewerEvent = "viewerEvent"
}
})
uj5u.com熱心網友回復:
不幸的是沒有人回答我的問題,我終于自己找到了解決方案,這個錯誤的原因是需要更改報告軟體的版本。
將此代碼添加到網路配置:
<appSettings>
<add key="PageInspector:ServerCodeMappingSupport" value="Disabled" />
</appSettings>
使用 StimulSoft Report 2015 或更高版本,2014 版本無法正常作業
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/459891.html
標籤:C# asp.net-mvc 刺激软件
上一篇:如何在下面做一個動態href?
下一篇:id評論系統
