'asp.net core web api project does not run
Solution 1:[1]
Please go under the properties folder of your project, open the launchSettings.json and look for ApplicationUrl under Profiles. You will find the exact port your project is using.
Solution 2:[2]
I faced the same problem today and came across this post. Web API (Dotnet Core) Project works from Visual Studio but not through Dotnet CLI. However, Web App (Dotnet Core) Project works from Visual Studio as well as through Dotnet CLI. (simply I am executing dotnet {webapp.dll} - without curley braces)
After a few trial-error as well as documentation from Microsoft I tried dotnet run "{dll}" and that works for me.
I have tried that for Web App + Web API (Dotnet Core) and both are working.
I know this is a very late reply but worth of adding my comments as it might worth of solving someone's problem, if not yours.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Mika Play |
| Solution 2 | Brijesh Shah |

