Want more features on Pastebin? Sign Up, it's FREE!
Guest

Upgraded project to Visual Studio 2010, but now get MVC error

By: a guest on Feb 21st, 2012  |  syntax: None  |  size: 2.05 KB  |  views: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. No parameterless constructor defined for this object.
  2. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
  3.  
  4. Exception Details: System.MissingMethodException: No parameterless constructor defined for this object.
  5.  
  6. Source Error:
  7.  
  8. An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
  9.  
  10. Stack Trace:
  11.  
  12. [MissingMethodException: No parameterless constructor defined for this object.]
  13.    System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
  14.    System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +86
  15.    System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +230
  16.    System.Activator.CreateInstance(Type type, Boolean nonPublic) +67
  17.    System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(Type controllerType) +82
  18.  
  19. [InvalidOperationException: An error occurred while creating a controller of type 'PartingOut.Web.Controllers.HomeController'. If the controller doesn't have a controller factory, ensure that it has a parameterless public constructor.]
  20.    System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(Type controllerType) +189
  21.    System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +74
  22.    System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) +128
  23.    System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext) +57
  24.    System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) +7
  25.    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
  26.    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
clone this paste RAW Paste Data