title: ASP.NET MVC controller always returns "False" on Post/Get request
body: <p>I'm facing a strange issue, I have created an ASP.NET Web API and added a new controller deriving from <code>ApiController</code> and added a new <code>Test</code> action. The API is using individual accounts authentication.</p>
  <p>But when I send an API call, it always returns &quot;False&quot;. I've checked by removing the <code>[Authorized]</code> attribute to check if there is something wrong with authorizing the request, but I still get the same error.</p>
  <p>He is my controller class:</p>
  <pre><code>using System.Configuration;
  using System.Web.Http;
  
  namespace Healthterest.Controllers
  {
      public class PinsController : ApiController
      {  
          public PinsController():base()
          {
          }
  
          // [Authorize]
          [HttpPost]
          [ActionName(&quot;test&quot;)]
          public IHttpActionResult test(string name) 
          {
              return Ok(name);
          }
      }
  }
  </code></pre>
  <p><code>WebApiConfig</code>:</p>
  <pre><code>using System;
  using System.Web.Http;
  using System.Web.Http.Cors;
  using Microsoft.Owin.Security.OAuth;
  
  namespace Healthterest
  {
      public static class WebApiConfig
      {
          public static void Register(HttpConfiguration config)
          {
              // Web API configuration and services
              // Configure Web API to use only bearer token authentication.
              config.SuppressDefaultHostAuthentication();
              config.Filters.Add(new HostAuthenticationFilter(OAuthDefaults.AuthenticationType));
              //EnableCrossSiteRequests(config);
              // Web API routes
              config.MapHttpAttributeRoutes();
              //config.EnableCors(new EnableCorsAttribute(&quot;*&quot;, headers: &quot;*&quot;, methods: &quot;*&quot;));
              config.Routes.MapHttpRoute(
                  name: &quot;DefaultApi&quot;,
                  routeTemplate: &quot;api/{controller}/{id}&quot;,
                  defaults: new { id = RouteParameter.Optional }
              );
          }
  
          private static void EnableCrossSiteRequests(HttpConfiguration config)
          {
              var cors = new EnableCorsAttribute(
                  origins: &quot;*&quot;,
                  headers: &quot;*&quot;,
                  methods: &quot;*&quot;);
              config.EnableCors(cors);
          }
      }
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/7tKoM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7tKoM.png" alt="enter image description here" /></a></p>
  <p>Can anyone help to find out what the issue is?</p>