I am getting the following error when I try to launch my ASP.Net Core App using IIS Server v7.5 ... I published the website (File System option in Visual Studio) to a specif
This worked for me, delete file: project.lock.json
and run dotnet restore
, restart visual studio
.
The only solution worked for me was to install 2 more items from Microsoft dot net core library:
https://www.microsoft.com/net/download/thank-you/dotnet-runtime-2.0.6-windows-x64-asp.net-core-runtime-installer
and
https://www.microsoft.com/net/download/thank-you/dotnet-runtime-2.0.6-windows-server-hosting-installer
I was getting this error. I fixed this error by installing the .NET Core Windows Server Hosting bundle (vs the Runtime Bundle), as described in instructions like this one.
Install the .NET Core Hosting Bundle
Install the .NET Core Hosting Bundle on the hosting system. The bundle installs the .NET Core Runtime, .NET Core Library, and the ASP.NET Core Module. The module creates the reverse proxy between IIS and the Kestrel server. If the system doesn't have an Internet connection, obtain and install the Microsoft Visual C++ 2015 Redistributable before installing the .NET Core Hosting Bundle.
As @Patrick says you can download the bundle installables from this link.
After installing that Module, my app served (i.e. no 500 error).
I see @Jørgen made this comment on OP already, so he gets credit.
EDIT Please confirm you install the Hosting bundle vs the Runtime Bundle per comment by @MDave
Did you install the .NET Core Windows Server Hosting bundle? This is needed for IIS to work as a reverse proxy for the .net core libraries. You'll find the link in this article: docs.microsoft.com/en-us/aspnet/core/publishing/iis I had the same problem before installing this on my dev machine. – Jørgen Tvedt Mar 28 at 6:31
I was able to solve this same problem when running in Visual Studio Community 2017 v. 15.7.1.
Had to install the latest dotnet-sdk-2.1.300-rc1-008673-win-x64.
https://www.microsoft.com/net/download/dotnet-sdk-2.1.300-rc1-windows-x64-installer