I added package Stimulsoft.Reports.Web.NetCore
Added a DesignerController:
Code: Select all
public class DesignerController : Controller
{
public IActionResult Index()
{
return View("StiDesigner");
}
public IActionResult GetReport()
{
var report = new StiReport();
report.Load(StiNetCoreHelper.MapPath(this, "Reports/MyTwoSimpleLists.mrt"));
return StiNetCoreDesigner.GetReportResult(this, report);
}
public IActionResult DesignerEvent()
{
return StiNetCoreDesigner.DesignerEventResult(this);
}
}
Code: Select all
@using Stimulsoft.Report.Mvc
@{
ViewBag.Title = "StiDesigner";
}
@Html.StiNetCoreDesigner(new StiNetCoreDesignerOptions()
{
Actions =
{
GetReport = "GetReport",
DesignerEvent = "DesignerEvent"
}
})
https://localhost:44364/Designer/Design ... nerScripts net::ERR_ABORTED 500 (Internal Server Error)
The error is thrown on this line:
return StiNetCoreDesigner.DesignerEventResult(this);
inside DesingerController
The whole call stack:
Code: Select all
System.InvalidOperationException
HResult=0x80131509
Message=Cache entry must specify a value for Size when SizeLimit is set.
Source=Microsoft.Extensions.Caching.Memory
StackTrace:
at Microsoft.Extensions.Caching.Memory.MemoryCache.SetEntry(CacheEntry entry)
at Microsoft.Extensions.Caching.Memory.CacheEntry.Dispose()
at Microsoft.Extensions.Caching.Memory.CacheExtensions.Set[TItem](IMemoryCache cache, Object key, TItem value, MemoryCacheEntryOptions options)
at Stimulsoft.System.Web.Caching.Cache.Add(String key, Object value, CacheDependency dependencies, DateTime absoluteExpiration, TimeSpan slidingExpiration, CacheItemPriority priority, CacheItemRemovedCallback onRemoveCallback)
at Stimulsoft.Report.Web.StiCacheHelper.SaveObject(Object obj, String guid)
at Stimulsoft.Report.Web.StiDesignerResourcesHelper.GetScripts(StiRequestParams requestParams) in Stimulsoft.Report.Web\StiDesignerResourcesHelper.cs:line 210
at Stimulsoft.Report.Web.StiDesignerResourcesHelper.Get(StiRequestParams requestParams) in Stimulsoft.Report.Web\StiDesignerResourcesHelper.cs:line 99
at Stimulsoft.Report.Mvc.StiNetCoreDesigner.DesignerEventResult(StiRequestParams requestParams, StiReport report) in Stimulsoft.Report.Mvc\StiNetCoreDesigner.cs:line 554
at ContractsRegistry.Controllers.DesignerController.DesignerEvent() in D:\Work\Contracts Registry\Source\ContractsRegistry\Controllers\DesignerController.cs:line 23
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) in /_/src/Mvc/Mvc.Core/src/Infrastructure/ActionMethodExecutor.cs:line 83
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync() in /_/src/Mvc/Mvc.Core/src/Infrastructure/ControllerActionInvoker.cs:line 395
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) in /_/src/Mvc/Mvc.Core/src/Infrastructure/ControllerActionInvoker.cs:line 250
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync() in /_/src/Mvc/Mvc.Core/src/Infrastructure/ControllerActionInvoker.cs:line 303
This exception was originally thrown at this call stack:
Microsoft.Extensions.Caching.Memory.MemoryCache.SetEntry(Microsoft.Extensions.Caching.Memory.CacheEntry)
Microsoft.Extensions.Caching.Memory.CacheEntry.Dispose()
Microsoft.Extensions.Caching.Memory.CacheExtensions.Set<TItem>(Microsoft.Extensions.Caching.Memory.IMemoryCache, object, TItem, Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions)
Stimulsoft.System.Web.Caching.Cache.Add(string, object, Stimulsoft.System.Web.Caching.CacheDependency, System.DateTime, System.TimeSpan, Stimulsoft.System.Web.Caching.CacheItemPriority, Stimulsoft.System.Web.Caching.CacheItemRemovedCallback)
Stimulsoft.Report.Web.StiCacheHelper.SaveObject(object, string)
Stimulsoft.Report.Web.StiDesignerResourcesHelper.GetScripts(Stimulsoft.Report.Web.StiRequestParams) in StiDesignerResourcesHelper.cs
Stimulsoft.Report.Web.StiDesignerResourcesHelper.Get(Stimulsoft.Report.Web.StiRequestParams) in StiDesignerResourcesHelper.cs
Stimulsoft.Report.Mvc.StiNetCoreDesigner.DesignerEventResult(Stimulsoft.Report.Web.StiRequestParams, Stimulsoft.Report.StiReport) in StiNetCoreDesigner.cs
ContractsRegistry.Controllers.DesignerController.DesignerEvent() in DesignerController.cs
Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(Microsoft.AspNetCore.Mvc.Infrastructure.IActionResultTypeMapper, Microsoft.Extensions.Internal.ObjectMethodExecutor, object, object[]) in ActionMethodExecutor.cs
But I have no idea where to look? I'd appreciate any help.