I'm currently evaluating your software for inclusion in a project I'm working on. Our project is using .NET Core 1.1. Your very helpful chat operator Andrew sent me a link to the GitHub Page for the example project "NET Core Samples".
This sample project runs great, but when I attempt to integrate the Stimulsoft Nuget package into our application I receive the following error:
Code: Select all
System.InvalidCastException: Unable to cast object of type 'Microsoft.AspNetCore.Mvc.Internal.AttributeRoute' to type 'Microsoft.AspNetCore.Routing.Route'.
at Stimulsoft.Report.NetCore.StiRequestParamsHelper.GetRequestUrl(ViewContext viewContext, String controller, Boolean relativeUrls, Boolean passQueryParams) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report.NetCore\Helpers\StiRequestParamsHelper.cs:line 200
at Stimulsoft.Report.NetCore.StiNetCoreDesigner.Render() in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report.NetCore\Designer\StiNetCoreDesigner.Render.cs:line 79
at Stimulsoft.Report.NetCore.StiNetCoreHelper.StiNetCoreDesigner(String id, StiNetCoreDesignerOptions options) in D:\Stimulsoft\Stimulsoft.Reports\Stimulsoft.Report.NetCore\StiNetCoreHelper.cs:line 77
at AspNetCore._Views_Home_Index_cshtml.<ExecuteAsync>d__21.MoveNext() in /Views/Home/Index.cshtml:line 9
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.<RenderPageAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Razor.RazorView.<RenderAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.<ExecuteAsync>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.ViewResult.<ExecuteResultAsync>d__26.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeResultAsync>d__30.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextResultFilterAsync>d__28.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ResultExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextResourceFilter>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ResourceExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeAsync>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Builder.RouterMiddleware.<Invoke>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.<Invoke>d__7.MoveNext()
Code: Select all
[Route("Home")]
public class HomeController : Controller
{...
Code: Select all
[Route("Index")]
public IActionResult Index()
{
return View();
}
http://localhost:50602/Home/Index
Could you please let me know if there's a way around this problem with our MVC Attribute Routing?
Thanks very much!
Ron Collins