title: Getting '405 Method not allowed' when accessing a web API through my ASP.NET web form
body: <p>I used JSON to pass my variables as per the request of my API provider... I am attaching the code below:</p>
  
  <pre class="lang-cs prettyprint-override"><code>string url = "http://api-v2.happay.in/auth/v1/adduser";
  string token = "fcd853a15a6e97b8834255dde74cd99527";
  
  string dataToUpload = "{"requestedId":"12389","userId":"134474","firstName":"Maredu Laxmi","lastName":"","emailId":"arar@gmail.com","mobileNo":"096518644","dob":"1978-02-26","gender":"Female","title":"Ms","password":"","metaFields":{"EmpId":"12389","Grade":"D6","Location":"Hyderabad"},"supervisors":[{"supervisorId":"1024","roleName":"RP"},{"supervisorId":"1025","roleName":"RP"}]}";
  
  var cli = new WebClient();
  
  cli.Headers[HttpRequestHeader.ContentType] = "application/json";
  cli.Headers[HttpRequestHeader.Authorization] = "Bearer " + token;
  
  string response = cli.UploadString(url, "POST", dataToUpload);
  </code></pre>
  
  <p>What am I doing wrong?</p>