title: Blazor - WASM : Failed to load resource: the server responded with a status of 404 (Not Found)
body: <p>I am getting below error, code is not able to find Controller and its methods. I am trying to add user to database from create user component.</p>
  
  <p>Failed to load resource: the server responded with a status of 404 (Not Found) </p>
  
  <p>Visual Studio 2019 Preview. 
  Client - Target Framework : .Net Standard 2.1
  Server - Target Framework : .Net Core 3.1
  Shared - Target Framework : .Net Standard 2.1</p>
  
  <p>dotnet --version
  3.1.200  ///Preview version</p>
  
  <p>Controller Code</p>
  
  <pre><code>[Route("api/[controller]")]
  [ApiController]
  public class UserInfoController : ControllerBase
  {
      private readonly ApplicationDbContext dbContext;
  
      public UserInfoController(ApplicationDbContext dbContext)
      {
          this.dbContext = dbContext;
      }
  
      [HttpPost]
      public async Task&lt;ActionResult&lt;int&gt;&gt; Post(UserInfo user)
      {
          //some code here to add user to db
      }
  }
  </code></pre>
  
  <p>Component Code</p>
  
  <pre><code>    private async Task AddUser()
      {
          Console.WriteLine("Add user method");
          try
          {
              await userService.CreateUser(_user);
          }
          catch (Exception ex)
          {
              Console.WriteLine(ex.Message);
          }
      }
  </code></pre>
  
  <p>User Service</p>
  
  <pre><code>public class UserServices : IUserInfo
  {
      private readonly IHttpService httpService;
      private string url = "api/userinfo"; //Controller
  
      public UserServices(IHttpService httpService)
      {
          this.httpService = httpService;
      }
  
      public async Task CreateUser(UserInfo user)
      {
          var response = await httpService.Post(url, user);
      }
  }
  </code></pre>
  
  <p>Thanks for help.</p>