title: Method called a GET instead of POST
body: <p>I have this 'POST' method</p>
  
  <pre><code>[HttpPost]
  [System.Web.Mvc.ValidateAntiForgeryToken]
  public HttpResponseMessage UpdateProfile(string sAppUser)
  {
      MobileProfileModel profileModel= JsonConvert.DeserializeObject&lt;MobileProfileModel&gt;(sAppUser);
      using (ucApp = new UserControllerApplication())
      {
          //this code should match the
          bool success = ucApp.UpdateUserProfile(profileModel);
          var response = Request.CreateResponse&lt;bool&gt;(HttpStatusCode.Created, success);
  
          string uri = Url.Link("DefaultApi", new { result = success });
          response.Headers.Location = new Uri(uri);
          return response;
      }
  }
  </code></pre>
  
  <p>and i calling it like this AJAX 'POST'</p>
  
  <pre><code>$.ajax({
      url: "http://mydomain.com/api/User/UpdateProfile",
      data:JSON.stringify(profile),
      type: 'POST',
      contentType: 'application/json',
      //dataType: "json",
      async: false,
      cache: false,
      success: function (data) {
           $.blockUI({ message: "Success" });
      },
      error: function (xhr) {
          alert(xhr.responseText);
      },  
      beforeSend: function() {
         $.blockUI({ message: $("#ajaxLoader") });
      },
      complete: function() {
         $.unblockUI();
      }
  });
  </code></pre>
  
  <p>and im getting this error </p>
  
  <pre><code>&lt;Error&gt;
  &lt;Message&gt;
  The requested resource does not support http method 'GET'.
  &lt;/Message&gt;
  &lt;/Error&gt;
  </code></pre>
  
  <p>The problem is Im not calling a GET method and the method isnt marked as a GET either.  I am not sure what the issue is.</p>
  
  <p><strong>UPDATE</strong>
  these are my route definitions</p>
  
  <pre><code>public static void RegisterRoutes(RouteCollection routes)
  {
      routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  
      //specific route for just the public views
      routes.MapRoute(
      "publicview",
      "publicview/details/{userName}",
      new { controller = "publicview", action = "details", username = UrlParameter.Optional }
      );
  
      routes.MapHttpRoute(
          name: "DefaultApi",
          routeTemplate: "api/{controller}/{action}/{id}",
          defaults: new { id = RouteParameter.Optional }
      );
  
      routes.MapRoute(
          name: "Default",
          url: "{controller}/{action}/{id}",
          defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
      );
  }
  </code></pre>
  
  <p>I am executing a Get method on the same controller and it works, this actually the post of that initial get.</p>