Created
January 2, 2013 20:45
-
-
Save normanhh3/4437832 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[NullReferenceException: Object reference not set to an instance of an object.] | |
Microsoft.Practices.Unity.UnityContainer..ctor(UnityContainer parent) +32 | |
Microsoft.Practices.Unity.UnityContainer.CreateChildContainer() +38 | |
Unity.Mvc3.UnityDependencyResolver.get_ChildContainer() +276 | |
Unity.Mvc3.UnityDependencyResolver.GetService(Type serviceType) +59 | |
System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +67 | |
[InvalidOperationException: An error occurred when trying to create a controller of type '[MyCoolApp.ControllerClass]'. Make sure that the controller has a parameterless public constructor.] | |
System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +247 | |
System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +85 | |
System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +270 | |
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +80 | |
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +405 | |
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +375 |
Have you found any solution or workaround? got the same using version 3.5.1404.0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The issue is not the lack of a parameterless constructor on the controller as is advertised but the underlying NullReferenceException from my analysis.