Assuming you are trying to run this from inside Visual Studio, theoretically you could run using the following launchsettings.json file
{
"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.