Skip to content

Instantly share code, notes, and snippets.

@normanhh3
Created January 2, 2013 20:45
Show Gist options
  • Save normanhh3/4437832 to your computer and use it in GitHub Desktop.
Save normanhh3/4437832 to your computer and use it in GitHub Desktop.
[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
@aleksei-krivoruchko
Copy link

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