我想在IIS上用IIS管理器上传我自己的asp.net网站。但是当我这样做时,我得到以下错误

HTTP错误500.19 -内部服务器错误不能被请求的页面 访问,因为该页的相关配置数据为 无效的

模块IIS Web核心 通知未知 处理人尚未确定 错误码0x80070005 Config Error由于权限不足,无法读取配置文件 配置文件\\?\C:\用户\亚索\文档\Visual Studio 2008\网站\WebSite5\web.config

我搜索了很多次这个错误的解决方案,但没有一个解决方案解决了这个错误。

我的IUSR账户有问题。我在web.config的属性中的“组或用户名”中看不到这个帐户。

有什么问题吗?


当前回答

另一个解决这个问题的方法是:

给“用户”适当的权限(或IIS_IUSRS,取决于你的设置)

其他回答

确保将应用程序池设置为框架的正确版本。您还需要确保您的aspnet、IIS_IUSRS或IUSR用户对应用程序的目录具有读访问权。

在我的情况下,configSections必须在配置的顶部

<configuration>
<configSections>
...
</configSections>
<othersetting>
</othersetting>
.....

我做这些步骤来解决这个问题 Windows Server 2012, IIS 8.5。应该也适用于其他版本。

Go to server manager, click add roles and features In the roles section choose: Web Server Under Security sub-section choose everything (I excluded digest, IP restrictions and URL authorization as we don't use them) Under Application Development choose .NET Extensibility 4.5, ASP.NET 4.5 and both ISAPI entries In the features section choose: NET 3.5, .NET 4.5, ASP.NET 4.5 In the web server section choose: Web Server (all), Management Tools (IIS Management Console and Management Service), Windows

*非常简单的解决方案:

进入IIS 从左侧窗格中选择您的应用程序。 双击中间窗格中的目录浏览。 现在转到右边窗格,在操作选项卡下,只需点击“启用”

就这些!!

人们,试着去理解这个错误: Config Error由于权限不足,无法读取配置文件

这里没有为我工作,我发现这个命令在另一个SO答案虽然,它解决了我的问题。以管理员身份启动命令提示符并运行以下命令:

run->cmd

run "c:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i"

资料来源:用户Vicxx