title: Getting 'An unhandled exception was generated during the execution of the current web request.' Error in my MVC UserManagementController
body: <p>When I'm executing my project and trying to access the web page <code>AccountSettings</code>, I get the error message </p>
  
  <blockquote>
    <p>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. </p>
  </blockquote>
  
  <p>Below is my code for the <code>UserManagementController</code></p>
  
  <pre><code>public class UserManagementController : Controller
  {
      private UserDatabaseEntities db = new UserDatabaseEntities();
  
      public ActionResult AccountSettings(int? id)
      {
          if (id == null)
          {
              return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
          }
          Login login = db.Logins.Find(id);
          if (login == null)
          {
              return HttpNotFound();
          }
          return View(login);
      }
  
      public ActionResult AccountSettings([Bind(Include = "UserID,Password")] Login login)
      {
          if (ModelState.IsValid)
          {
              db.Entry(login).State = EntityState.Modified;
              db.SaveChanges();
              return RedirectToAction("Index");
          }
          return View(login);
      }
  }
  </code></pre>
  
  <p>Every other page runs fine, apart from Edit and AccountSettings, they perform similar functions however when i have user groups set up only admin will be able to access edit as the primary user creation page, and AccountSettings will be individual to user in order for them to change password on the back-end.</p>
  
  <p>Here is the error message i get when trying to run the page </p>
  
  <blockquote>
    <p>[AmbiguousMatchException: The current request for action 'AccountSettings' on controller type 'UserManagementController' is ambiguous between the following action methods:
        System.Web.Mvc.ActionResult AccountSettings(System.Nullable`1[System.Int32]) on type WebSpares3.Views.UserManagementController
        System.Web.Mvc.ActionResult AccountSettings(WebSpares3.Models.Login) on type WebSpares3.Views.UserManagementController]</p>
  </blockquote>