title: Getting net::ERR_CONNECTION_REFUSED when trying to access a Controller from a react app in localhost
body: <p>Hope you all are safe and doing well. </p>
  
  <p>I am new to React and ASP.NET. I was trying to setup a asp.net core webapp following the <a href="https://www.red-gate.com/simple-talk/dotnet/net-development/creating-asp-net-apps-with-react/" rel="nofollow noreferrer">tutorial</a>.</p>
  
  <p>When I run <code>npm start</code> the application spins up correctly, but when I try to add any user-detail, in network tab the API call fails with <code>net::ERR_CONNECTION_REFUSED</code>. Also I am not sure, if I should hit <code>localhost:3000</code> it gives <code>404</code> or <code>localhost:5000</code> to hit the API. although in tutorial it hits <code>5001</code>. When I try to hit <code>10.0.2.2:5001</code> (again based on some other provided solution)I start getting connection time out. I tried various solutions including <a href="https://stackoverflow.com/questions/37352603/localhost-refused-to-connect-error-in-visual-studio?page=1&amp;tab=votes#_=_">this</a> but none of them seem to be working for me.</p>
  
  <p>The code is exactly the same as I am trying to run the cloned project, but let me know if I need to paste more details.</p>
  
  <p>I am actually trying to setup a company project following the same modules given in the tutorial but facing the same error and the call from app to controller is not happening with the same error.</p>
  
  <p>Any help is much appreciated. Thanks in advance.</p>