title: Method not Allowed Error in Jquery Ajax Method used
body: <p>I am using jQuery Ajax method with Asp.net MVC 3.0 </p>
  
  <p>My jQuery Code is </p>
  
  <pre><code>$.ajax({
         type: "POST",
         url: "/HomePage/GetAllCategories",
         contentType: "application/json; charset=utf-8",                
         dataType: 'json',
         success: function (result) {
            alert(result);
      }
  });
  </code></pre>
  
  <p>And my Action Method is</p>
  
  <pre><code>public JsonResult GetAllCategories()
  {
       return Json(null, JsonRequestBehavior.AllowGet);
  }
  </code></pre>
  
  <p>I am getting the Error</p>
  
  <blockquote>
    <p>POST <a href="http://localhost:50500/HomePage/GetAllCategories" rel="nofollow noreferrer">http://localhost:50500/HomePage/GetAllCategories</a> 405 (Method Not
    Allowed)</p>
  </blockquote>
  
  <p>My debugger is not hitting this method.</p>