I have to rename my project as per my team lead.Say from Prj1 to Prj
So as in the process I have changed namespace too.But now I am getting following error on project run.
System.InvalidOperationException: Multiple types were found that match the controller named 'Account'. This can happen if the route that services this request ('{controller}/{action}/{id}') does not specify namespaces to search for a controller that matches the request. If this is the case, register this route by calling an overload of the 'MapRoute' method that takes a 'namespaces' parameter.
The request for 'Account' has found the following matching controllers:
prj_Track.Controllers.AccountController
prj1_Track.Controllers.AccountController
at System.Web.Mvc.DefaultControllerFactory.GetControllerTypeWithinNamespaces(RouteBase route, String controllerName, HashSet`1 namespaces)
at System.Web.Mvc.DefaultControllerFactory.GetControllerType(RequestContext requestContext, String controllerName)
at System.Web.Mvc.DefaultControllerFactory.System.Web.Mvc.IControllerFactory.GetControllerSessionBehavior(RequestContext requestContext, String controllerName)
at System.Web.Mvc.MvcRouteHandler.GetSessionStateBehavior(RequestContext requestContext)
at System.Web.Mvc.MvcRouteHandler.GetHttpHandler(RequestContext requestContext)
at System.Web.Mvc.MvcRouteHandler.System.Web.Routing.IRouteHandler.GetHttpHandler(RequestContext requestContext)
at System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context)
at System.Web.Routing.UrlRoutingModule.OnApplicationPostResolveRequestCache(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
So I guess the rename of namespace was not proper.
Steps are
1. (shift + ctl + h) and replace
2. prj properties -> default namespace && assembly name
Any help will be appreciated