I created a project with
dotnet-new angular-cli MyProject. When I try to run the project I get the error
invalid application pool name in an alert dialogue and it wont run.
I have updated
@servicestack/cli. I can run other projects fine.
Any idea what the issue is?
I've just tried
$ dotnet-new angular-cli MyProject
Which both installs and runs npm build and NuGet restore without error, I can then run the .NET Core App with
dotnet run, e.g:
PS C:\src\wip\dotnet-new\MyProject\MyProject> dotnet run
Using launch settings from C:\src\wip\dotnet-new\MyProject\MyProject\Properties\launchSettings.json...
Hosting environment: Development
Content root path: C:\src\wip\dotnet-new\MyProject\MyProject
Now listening on: http://localhost:5000
Now listening on: https://localhost:5001
Application started. Press Ctrl+C to shut down.
It also runs without issue in VS Code:
or JetBrains Rider:
But yeah I'm seeing the issue when trying to run the project in VS .NET 2017 which looks like it's an issue when trying to run it under IIS Express, but works if you switch to run it as a Console App:
The issue is from VS.NET trying to run the Web App under the default .NET Core 2.1 multiple bindings, i.e.
http://localhost:5000/;https://localhost:5001/, but will work if you change it to an unused port, e.g:
It will also work on
http://localhost:5000/ if you run VS .NET as Administrator where I'm assuming has permissions to override any previous registration on that port.
From what I can tell VS .NET and IIS Express doesn't support .NET Core 2.1's default use of multiple http/https bindings.
Running as administrator and changing the port worked. Thanks Mythz!