title: Server Error in '/' Application. Resource Cannot Be Found. ASP.NET MVC
body: <p>I'm using ASP.NET MVC 4 C Sharp and I have this error</p>
  
  <blockquote>
    <p>Server Error in '/' Application.</p>
    
    <p>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.</p>
  </blockquote>
  
  <p>Requested URL: /ClerkBooking/ConfirmBooking/22</p>
  
  <p>In my controller I have:</p>
  
  <pre><code>  [HttpPost]
      [ValidateAntiForgeryToken]
      [Authorize(Roles = "Booking Clerk")]
      public ActionResult ConfirmBooking(int id = 0)
      {
         if (ModelState.IsValid)
         {
              //Find the booking
              Booking booking = db.Bookings.Find(id);
  
              //Get RoomID of Preferred Room.
              int roomId = Convert.ToInt32(db.Rooms.Find(booking.PreferredRoom));
  
              //Set RoomID of Booking.
              booking.RoomId = roomId;
  
              //Save Changes.
              db.SaveChanges();
          }
  
          return View("Index");
      }
  </code></pre>
  
  <p>So im not sure why its not finding the method even though its in the correct place. Any help would be great! Thanks!</p>