SQLMan
SQLMan

Reputation: 11

StimulReport Error with MVC (Access Denied or Null Value)

I have a stimulus report that runs locally without any problems, but I get the following error in IIS

Access to the path 'Stimulsoft' is denied.

System.UnauthorizedAccessException: Access to the path 'Stimulsoft' is denied.

Source Error : Line 6

Line 4:  }
Line 5: 
Line 6:  @Html.Stimulsoft().StiMvcViewer(options: new StiMvcViewerOptions()
Line 7:  {
Line 8:      Actions =

Code in Controller :

public ActionResult report()
        {
            var report = new StiReport();
            report.Load(Server.MapPath("~/Content/SalaryReport.mrt"));
            report.Compile();

Code in View :

@using Stimulsoft.Report.Mvc;
@{
    ViewBag.Title = "Print";
}

@Html.Stimulsoft().StiMvcViewer(options: new StiMvcViewerOptions()
{
    Actions =
    {
        GetReport = "report",
        ViewerEvent = "viewerEvent"
    }
})

Upvotes: 0

Views: 310

Answers (1)

SQLMan
SQLMan

Reputation: 11

unfortunately no one answered my question and I finally found the solution myself, the reason for this error is in the version of the reporting software that needs to be changed.

add this code to web config :

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

Use StimulSoft Report 2015 or higher, version 2014 does not work properly

Upvotes: 0

Related Questions