I have a large solution stored in a repository on GitHub. It is working fine. But when I download that repository to another computer, it does not run in debug mode.
The solution runs two projects: My main project and an API project. On my original computer, my API project loads at port 44360. But on the new computer at port 7184.
Here is my launchsettings.json file for my API application. It is the same on both computers.
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:40682",
"sslPort": 44360
}
},
"profiles": {
"TTRailtrax": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:7184;http://localhost:5184",
"dotnetRunMessages": true
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
I don't quite understand why the code seems to interpret the launch settings differently depending on which computer it is running on. Apparently, it is related to a setting that is not stored in the repository, and so must be set manually.
Update
Below is a screenshot of my start up item. Note that my solution is configured to run two projects and options above the divider are my multi-project start up configurations.
-
1The Visual Studio in your other computer may select the "TTRailtrax" profile instead of "IIS Express" profile as the default debug option e.g. user-images.githubusercontent.com/20598632/…Ben Lam– Ben Lam2025年10月13日 21:40:44 +00:00Commented Oct 13, 2025 at 21:40
-
@BenLam: Yes, that was it. My startup item did not look like yours because my solution was configured to run multiple projects. But by selecting individual projects, I was able to get this working. Thanks.Jonathan Wood– Jonathan Wood2025年10月13日 21:52:02 +00:00Commented Oct 13, 2025 at 21:52
1 Answer 1
In order to use the IIS SSL settings, you need to set your project to use IIS Express.
My problem was that, when the solution is configured to run multiple projects, this option is not available.
In this case, it is necessary to select each project as the only startup project, set it to use IIS Express, and then set it back to run multiple projects.
Comments
Explore related questions
See similar questions with these tags.