Remotely connect to .net core self hosted web api

后端 未结 6 874
既然无缘
既然无缘 2020-12-29 02:11

I have a simple .net core web api with one action:

[Route(\"[action]\")]
public class APIController : Controller
{
    // GET api/values
    [HttpGet]
    pu         


        
6条回答
  •  情话喂你
    2020-12-29 02:41

    In my case (.NET core 2.1) I had to modify the Properties/launchSettings.json file.

    Set the applicationUrl to a list of allowed urls separated by semicolons like this

    "applicationUrl": "https://localhost:5001;http://odin:5000"
    

    Hope this helps someone out there.

提交回复
热议问题