HTTP 错误 500.19 - Internal Server Error 无法访问请求的页面,因为该页的相关配置数据无效

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/chenguanghan123/article/details/86716080

       因为 IIS 7 采用了更安全的 web.config 管理机制,默认情况下会锁住配置项不允许更改。运行命令行 %windir%\system32\inetsrv\appcmd unlock config -section:system.webServer/handlers 。

       其中的 handlers 是错误信息中红字显示的节点名称。

如果modules也被锁定,可以运行%windir%\system32\inetsrv\appcmd unlock config -section:system.webServer/modules

这个错误完了之后就遇到了下一个错误:HTTP 错误 404.3 - Not Found 由于扩展配置问题而无法提供您请求的页面。

Visual Studio 命令提示工具中。输入命令:  aspnet_regiis -i

控制面板-》打开或关闭windows功能-》Internet信息服务-》万维网服务-》应用程序开发功能,勾选上“.net扩展性”和“ASP.NET”,保存后,重启IIS服务器即可。

猜你喜欢

转载自blog.csdn.net/chenguanghan123/article/details/86716080