title: HttpClient+WebApi+Multiple Post + multiple parametres
body: <p>I am new to asp.net, I encountered a small problem, i create a new webapi controller in MVC project, when i try to get response from this controlle i get  404 error :s </p>
  
  <p>here is the code of controler used : </p>
  
  <pre><code>public class SampleController : ApiController
      {
          [HttpPost]
          public string Auth(string number, string password)
          {
              ....
          }
  
          [HttpPost]
          public string SendSms(string smsTo, string content)
          {
              ....
          }
      }
  </code></pre>
  
  <p>WebApiConfig : </p>
  
  <pre><code>public static class WebApiConfig
  {
      public static void Register(HttpConfiguration config)
      {
          config.Routes.MapHttpRoute(
              name: "DefaultApi",
              routeTemplate: "api/{controller}/{id}",
              defaults: new { id = RouteParameter.Optional }
          );
      }
  }
  </code></pre>
  
  <p>and here the code c# : </p>
  
  <pre><code>using (var client = new HttpClient())
              {
                  client.BaseAddress = new Uri("http://localhost:66893");
                  var content = new FormUrlEncodedContent(new[] 
              {
                  new KeyValuePair&lt;string, string&gt;("number", "login"),
                  new KeyValuePair&lt;string, string&gt;("password", "password")
              });
                  var result = client.PostAsync("/api/sms/auth", content).Result;
                  string resultContent = result.Content.ReadAsStringAsync().Result;
                  Console.WriteLine(resultContent);
              }
  </code></pre>
  
  <p>when i try localhost:66893/api/sms/auth?number=xxx&amp;password=xxx in XHR Poster i get the result :s</p>
  
  <p>plz help 
  thx a lot</p>