title: server error in application the resource cannot be found
body: <p>I am working at an ASp.net mvc 3 project and
   I keep getting this error and can find any help to solve the problem</p>
  
  <pre><code>Server Error in '/' Application.
  The resource cannot be found.
  Description: HTTP 404. The resource you are looking for (or one of its dependencies) 
  could have been removed, had its name changed, or is temporarily unavailable.      Please       review  the following URL and make sure that it is spelled correctly.
  
    Requested URL: /RoomType
  </code></pre>
  
  <p>But I have The RoomType controller and  in my Global.asax I have:</p>
  
  <pre><code>     public static void RegisterRoutes(RouteCollection routes)
        {
          routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
          routes.MapRoute(
       null, // we don't need to specify a name
       "Page{page}",
             new { Controller = "Room", action = "List" }
  </code></pre>
  
  <p>);</p>
  
  <pre><code>        routes.MapRoute(
              "Default", // Route name
              "{controller}/{action}/{id}", // URL with parameters
              new { controller = "Room", action = "List", id = UrlParameter.Optional } // Parameter defaults
          );
  
          routes.MapRoute(
              null, // Route name
              "{controller}/{action}/{id}", // URL with parameters
              new { controller = "Room", action = "Index", id = UrlParameter.Optional } // Parameter defaults
          );
          routes.MapRoute(
             null, // Route name
             "{controller}/{action}/{id}", // URL with parameters
             new { controller = "RoomType", action = "Index", id = UrlParameter.Optional } // Parameter defaults
         );
  </code></pre>
  
  <p>Here is my RoomTypeController :</p>
  
  <pre><code>   using System;
     using System.Collections.Generic;
     using System.Data;
      using System.Data.Entity;
      using System.Data.Entity.Infrastructure;
       using System.Data.Objects;
         using System.Linq;
       using System.Web;
       using System.Web.Mvc;
       using MvcApplication4.Models;
  
       namespace MvcApplication4.Controllers
      {
      public class RoomTypeController : Controller
      {
      private hotelEntities db = new hotelEntities();
  
      //
      // GET: /RoomType/
  
      public ViewResult Index(int start = 0, int itemsPerPage = 20, string orderBy = "RoomType_ID", bool desc = false)
      {
          ViewBag.Count = db.Room_Type.Count();
          ViewBag.Start = start;
          ViewBag.ItemsPerPage = itemsPerPage;
          ViewBag.OrderBy = orderBy;
          ViewBag.Desc = desc;
  
          return View();
      }
  
      //
        // GET: /RoomType/GridData/?start=0&amp;itemsPerPage=20&amp;orderBy=RoomType_ID&amp;desc=true
  
          public ActionResult GridData(int start = 0, int itemsPerPage = 20, string orderBy = "RoomType_ID", bool desc = false)
          {
          Response.AppendHeader("X-Total-Row-Count", db.Room_Type.Count().ToString());
           ObjectQuery&lt;Room_Type&gt; room_type = (db as   IObjectContextAdapter).ObjectContext.CreateObjectSet&lt;Room_Type&gt;();
          room_type = room_type.OrderBy("it." + orderBy + (desc ? " desc" : ""));
  
          return PartialView(room_type.Skip(start).Take(itemsPerPage));
      }
  
      //
      // GET: /Default5/RowData/5
  
      public ActionResult RowData(int id)
      {
          Room_Type room_type = db.Room_Type.Find(id);
          return PartialView("GridData", new Room_Type[] { room_type });
      }
  
      //
      // GET: /RoomType/Create
  
      public ActionResult Create()
      {
          return PartialView("Edit");
      }
  
      //
      // POST: /RoomType/Create
  
      [HttpPost]
      public ActionResult Create(Room_Type room_type)
      {
          if (ModelState.IsValid)
          {
              db.Room_Type.Add(room_type);
              db.SaveChanges();
              return PartialView("GridData", new Room_Type[] { room_type });
          }
  
          return PartialView("Edit", room_type);
      }
  
      //
      // GET: /RoomType/Edit/5
  
      public ActionResult Edit(int id)
      {
          Room_Type room_type = db.Room_Type.Find(id);
          return PartialView(room_type);
      }
  
      //
      // POST: /RoomType/Edit/5
  
      [HttpPost]
      public ActionResult Edit(Room_Type room_type)
      {
          if (ModelState.IsValid)
          {
              db.Entry(room_type).State = EntityState.Modified;
              db.SaveChanges();
              return PartialView("GridData", new Room_Type[] { room_type });
          }
  
          return PartialView(room_type);
      }
  
      //
      // POST: /RoomType/Delete/5
  
      [HttpPost]
      public void Delete(int id)
      {
          Room_Type room_type = db.Room_Type.Find(id);
          db.Room_Type.Remove(room_type);
          db.SaveChanges();
      }
  
      protected override void Dispose(bool disposing)
      {
          db.Dispose();
          base.Dispose(disposing);
       }
     }
    }
  </code></pre>