IIS HTTP Error 500: The requested Page cannot be accessed because related configuration data is invalid [duplicate]

那年仲夏 提交于 2021-02-07 13:12:58

问题


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

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

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>

What is problem?


回答1:


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

You can find the link here




回答2:


Can you try giving access to IIS Application pool user to the website directory, sometime if the files are readonly or if the IIS App pool user permissions are not there , this error might popup.



来源:https://stackoverflow.com/questions/40684342/iis-http-error-500-the-requested-page-cannot-be-accessed-because-related-config

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