Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.Net Core Project won't open browser by default

When debugging in VS 2019 the api url automatically opens which is different from the angular live url.

The angular live url is my actual complete application. Is there a way to open that url automatically when debugging?

like image 250
Terrance Jackson Avatar asked Nov 18 '25 09:11

Terrance Jackson


1 Answers

I think you need to modify your json config a little bit. So when you use VS to run your code or using dotnet run command you will use port 59709 to run your app

{
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:59709/",
      "sslPort": 0
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      },
      "ancmHostingModel": "InProcess"
    },
    "KaddaTechnologies": {
      "commandName": "Project",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      },
      "applicationUrl": "http://localhost:59709/"
    }
  }
}
like image 161
Tony Ngo Avatar answered Nov 20 '25 00:11

Tony Ngo