异常处理之IIS配置加载出错

问题详情:

 一台部署在海外服务器,在管理IIS过程中,出现问题

There was an error when trying to connect. Do you want > to retype your credentials and try again?

Details:

Filename:

\?\C:\Windows\system32\inetsrv\config> \applicationHost.config Line number: 1 Error: Configuration file is not well-formed XML

解决方案:

找到 C:\inetpub\history. 里面最新的一个IIS配置文件applicationhost.config,覆盖 C:\Windows\system32\inetsrv\config\applicationhost.config

原因分析
  1. 在覆盖之前,打开 C:\Windows\system32\inetsrv\config\applicationhost.config 这个文件,发现config里面的内容全部乱码。如果损坏iis的配置,iis管理就无法打开,配置加载错。
  2. C:\inetpub\history这个目录存在着每次变更后的一些备份可以用于iis的配置的恢复。

论坛stackoverflow上也有相关讨论,详细地址

posted @ 2018-12-04 17:34  therhub  阅读(385)  评论(0编辑  收藏  举报