Asp.net
IIS HTTP 錯誤 500:無法訪問請求的頁面,因為相關配置數據無效
我已經在我的本地機器(Windows 10)上成功地在 IIS(版本 10)上發布了一個 ASP.NET Core 網站並瀏覽了它。
但是,當我在另一台 PC 上的 IIS 上部署它(使用相同的版本)時,它會給出HTTP 錯誤 500.19:
我使用的是相同的
Web.config,IIS_IUSRS對虛擬目錄和配置文件都有權限。我還將應用程序池“IIS AppPool/MyPool”的權限添加到虛擬目錄。這是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 bundle,我從 web.config “AspNetCoreModule”中意識到了這一點。
你可以在這裡找到連結
您是否可以嘗試授予 IIS 應用程序池使用者對網站目錄的訪問權限,有時如果文件是只讀的或 IIS 應用程序池使用者權限不存在,則可能會彈出此錯誤。
