本文介绍了IIS HTTP错误500:无法访问请求的页面,因为相关的配置数据无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在本地计算机(Windows 10)上的IIS(版本10)上成功发布了ASP.NET Core网站并进行了浏览.

I have successfully published an ASP.NET Core website on IIS (version 10) on my local machine (Windows 10) and browsed it.

但是,当我将其部署在另一台PC(使用相同版本)的IIS上时,它会显示 HTTP错误500.19 :

However, when I deploy it on IIS on another PC (using same versions), it gives HTTP Error 500.19:

我使用的是相同的 Web.config ,并且 IIS_IUSRS 对虚拟目录和配置文件均具有权限.我还将虚拟机目录"IIS AppPool/MyPool"的权限添加到了虚拟目录中.这是web.config:

I am using the same Web.config and IIS_IUSRS has permissions on both the virtual directory and config file. I also added the permission for the app pool `IIS AppPool/MyPool' to the virtual directory. Here is the web.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath="dotnet" arguments=".\IdentityServer.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" />
  </system.webServer>
</configuration>

出什么问题了?

推荐答案

它丢失了 .NET Core Windows Server Hosting包,我已经从web.config"AspNetCoreModule"中意识到这一点.

It was missing the NET Core Windows Server Hosting bundle, I have realized that from the web.config "AspNetCoreModule".

您可以在此处

这篇关于IIS HTTP错误500:无法访问请求的页面,因为相关的配置数据无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 20:43