Reputation: 1871
I'm trying to run the default vanilla ASP.NET core website from VS, on my windows server 2016 instance. But when I run it I get a HTTP 502.3 error
I enabled logging from the web config, the logging message I get back is
Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
I've install the windows hosting bundles
https://dotnet.microsoft.com/download/dotnet-core/2.2
https://dotnet.microsoft.com/download/dotnet-core/2.1
The CSProj is targeting the netcoreapp2.1 runtime
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
Upvotes: 2
Views: 358
Reputation: 2743
The default publication was using 'portable' as a target runtime, which requires the SDK to be installed. Switching it to match your machine architecture, 'win-x64' in that case, enables it to run with simply the proper dotnet runtime installed.
Upvotes: 1
Reputation: 239380
The hosting bundle is for IIS proper, when deploying an already compiled ASP.NET Core app. In Visual Studio, you're running against IIS Express and the source code needs to be compiled to deploy it there. That requires the SDK; the runtime is not enough. Download the .NET Core SDK and you'll be fine.
Upvotes: 2