title: Remote validation with SimpleMembership in MVC4 - Doesnt hit controller method
body: <p>I am trying to use Remote Validation on the UserName proerty, on the Register page, so the user gets a notice if the user name is already taken.  It worked before I added the SimpleMembership stuff.  </p>
  
  <p>After adding simlplemembership, it stopped working, returned an error, something about all the simplemembership tables not having PKs.  I researched and found a somewhat built-in way to do the remote validation.</p>
  
  <p>Now I get no errors, and I can see in the network tab of the google developer tools, that the ajax call is being made to the correct controller, but I put a breakpoint in the controller method, and it does not get hit.  So not sure what to do.  Here is how I am setup:</p>
  
  <p>The model with the Remote attribute attached.:</p>
  
  <pre><code>    [Required]
      [Remote("VerifyUserExists", "Account")]
      [Display(Name = "User name")]
      public string UserName { get; set; }
  </code></pre>
  
  <p>The controller method thats does not get hit:</p>
  
  <pre><code>    public JsonResult VerifyUserExists(string username)
      {
          var user = Membership.GetUser(username);
  
          if (user != null)
          {
              return Json(ErrorCodeToString(MembershipCreateStatus.DuplicateUserName),
                              JsonRequestBehavior.AllowGet);
          }
          else
          {
              return Json(true, JsonRequestBehavior.AllowGet);
          }
  
      }
  </code></pre>
  
  <p>and validation is enabled in the web config;</p>
  
  <pre><code>&lt;add key="ClientValidationEnabled" value="true" /&gt;
  &lt;add key="UnobtrusiveJavaScriptEnabled" value="true" /&gt;
  </code></pre>
  
  <p>Any ideas what i am missing?  Again, this all worked before I added in the simplemembership stuff.</p>