IIS Server & ASP.Net Core - page cannot be accessed because the related configuration data for the page is invalid

孤街浪徒 提交于 2019-11-27 07:58:59

I believe I was getting this error. I hadn't yet Installed the .NET Core Windows Server Hosting 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:

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

This worked for me, delete file: project.lock.json and run dotnet restore, restart visual studio.

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!