title: Expose .NET Core WebAPI from VSCode on Network on WSL2
body: <p>I develop in WSL2. I have a .NET Core web API, that I want to to run from a VS Code debug session, that I want to access from another machine, to trigger my breakpoint (the other machine adds some additional headers).  I can only seem to access this from my machine under localhost. I cannot access this from another machine on the network as say - <a href="http://mymachinename.domain.com/api/MyEndpoint" rel="nofollow noreferrer">http://mymachinename.domain.com/api/MyEndpoint</a>.</p>
  <p>However, we can do this while running under Windows, with UseUrls in Program.cs, but this does not seem to work while hosted in WSL2.</p>
  <pre><code>public static IHostBuilder CreateHostBuilder(string[] args) =&gt;
      Host.CreateDefaultBuilder(args)
          .ConfigureWebHostDefaults(webBuilder =&gt;
          {
              webBuilder.UseStartup&lt;Startup&gt;();
              webBuilder.UseUrls(&quot;http://0.0.0.0:5000&quot;, &quot;http://mymachinename:5000&quot;); 
          });
  </code></pre>
  <p>}</p>
  <p>How do I make accessible on our network while hosted in WSL2?</p>