Note that there are some explanatory texts on larger screens.

plurals
  1. POError Creating Simple Controller MVC
    primarykey
    data
    text
    <p>I am creating a simple empty Controller <code>Default1</code> in ASP.NET MVC4 VS 2012 but when I run it, it gives error.</p> <p>My Controller is as follows:</p> <pre><code>public class Default1Controller : Controller { // // GET: /Default1/ public ActionResult Index() { return View(); } } </code></pre> <p>Following Error is thrown:</p> <pre><code>[HttpException]: The controller for path &amp;#39;/Default1&amp;#39; was not found or does not implement IController. at System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) at System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) at System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext,IController&amp; controller, IControllerFactory&amp; factory) at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext,AsyncCallback callback, Object state) at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext,AsyncCallback callback, Object state) at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionSep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) </code></pre> <p>RouteConfig:</p> <pre><code>public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } ); } } </code></pre> <p>Actually I have been creating controllers before this event but some how what ever controller I creates now is not accessible.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload