-
Notifications
You must be signed in to change notification settings - Fork 29
Description
I have an asp.net core 2.0 application.
In startup
I am calling services.AddMvc()
;
This registers MvcRouteHandler
as a singleton.
MvcRouteHandler
has two constructors. The greediest one takes an IActionContextAccessor
which AFAIK is not ever registered.
When I call app.UseMvc()
- it tries to resolve MvcRouteHandler
. I then see this exception:
StructureMap.StructureMapConfigurationException: 'No default Instance is registered and cannot be automatically determined for type 'Microsoft.AspNetCore.Mvc.Infrastructure.IActionContextAccessor'
There is no configuration specified for Microsoft.AspNetCore.Mvc.Infrastructure.IActionContextAccessor
1.) new MvcRouteHandler(Default of IActionInvokerFactory, Default of IActionSelector, Default of DiagnosticSource, Default of ILoggerFactory, Default of IActionContextAccessor)
2.) Microsoft.AspNetCore.Mvc.Internal.MvcRouteHandler
3.) Instance of Microsoft.AspNetCore.Mvc.Internal.MvcRouteHandler
4.) Container.GetInstance(Microsoft.AspNetCore.Mvc.Internal.MvcRouteHandler)
What would be the best way to proceed?