title: Access ASP.NET Core 2.1 web app hosted on localhost from mobile device
body: <p>I create an out of the box asp.net core 2.1 web app with react.
  When I run it, it hosts on localhost:(some port).
  I want to access that on my mobile device.</p>
  <p>I tried accessing it from localhost by adding the port to the Inbound Rules on Windows Defender Firewall.It didn't work so I wanted to change the ip address to 0.0.0.0:(some port) or to host it on my local IPv4 address by changing the lauchSettings.json and Program.cs by .UseUrls method. It didn't work, gave me an error that the app cannot run.
  I tried using my external IP address which I got from asking &quot;My ip address&quot; in Google but that didn't help as well.</p>
  <p><a href="https://i.stack.imgur.com/cOx3T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cOx3T.png" alt="Picture of Program.cs file" /></a></p>
  <p><a href="https://i.stack.imgur.com/txFOJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/txFOJ.png" alt="Picture of lauchSettings.js" /></a></p>
  <p><a href="https://i.stack.imgur.com/1VPht.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1VPht.png" alt="Error when changing lauchSettings.js" /></a></p>