Click here to Skip to main content
16,022,298 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
JSON
{
  "profiles": {
    "HuyShop2024": {
      "commandName": "Project",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      },
      "dotnetRunMessages": true,
      "applicationUrl": "https://localhost:443;http://localhost:80"
    },
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    }
  },
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:60514/",//this
      "sslPort": 44356 //this
    }
  }
}


What I have tried:

How do i run on default port (443 or 80)
Posted
Updated 12-Jul-24 2:28am
v2

1 solution

Assuming you are trying to run this from inside Visual Studio, theoretically you could run using the following launchsettings.json file
JSON
{
  "profiles": {
    "HuyShop2024": {
      "commandName": "Project",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      },
      "dotnetRunMessages": true,
      "applicationUrl": "https://localhost:443;http://localhost:80"
    },
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    }
  },
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:80/",
      "sslPort": 443
    }
  }
}
If you do this however, you will need to run Visual Studio as an admin user. The alternative would be to publish your application out to run inside IIS on the appropriate port.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900