WebMatrix无法启动问题

之前已经听闻过WebMatrix这个工具,今天正好有时间,遂想尝试一下,看看与Visual Studio有什么区别。

首先是从其官网上下载安装包,地址在这里。文件很小,只有94K。

接着双击文件进行安装,无需任何选择,过程十分简单。当然,这么小的安装包肯定无法满足安装需要,所以必要的文件还要另外通过网络下载。依据网速的快慢,安装的时间会有所变化。

完成安装之后便可以启动程序了。为了尽早体验WebMatrix建站的感觉,所以一开始选择了模板方式快捷建立网站。

数秒钟后,一个崭新的“入门网站”便诞生了。果然方便!

看了一下界面,菜单上有“启动”按钮,就先先看看网站的效果吧。点击,跳出了“以下网站已停止:“入门网站”。”的警告。

这是怎么回事?

第一反应是IIS出问题了。于是在CMD中运行“C:\Program Files (x86)\IIS Express>iisexpress.exe /trace:error”命令。结果出现了下面这样的错误:

正在启动 IIS Express…
Initializing the W3 Server Started CTC = 4485278
 W3 Server initializing WinSock. CTC = 4485293
 W3 Server WinSock initialized. CTC = 4485293
 W3 Server ThreadPool initialized (ipm has signalled). CTC = 4485293
 Failed to load global module C:\Program Files (x86)\IIS Express\diprestr.dll
 Failed processing with hr = 8007007e
 Error loading global modules. hr = 8007007e
 Terminating W3_SERVER object
 Start listenerChannel http:0
 Initializing the W3 Server Started CTC = 4486307
 W3 Server initializing WinSock. CTC = 4486323
 W3 Server WinSock initialized. CTC = 4486323
 W3 Server ThreadPool initialized (ipm has signalled). CTC = 4486323
 Failed to load global module C:\Program Files (x86)\IIS Express\diprestr.dll
 Failed processing with hr = 8007007e
 Error loading global modules. hr = 8007007e
 Terminating W3_SERVER object
 InitComplete event signalled
 Report ListenerChannel stopped due to failure; ProtocolId:http, ListenerChannelI
 d:0
 Process Model Shutdown called
 Failed to start ‘HostedWASStart’. Error = 35634384
 HostableWebCore activation failed.
无法启动 iisexpress。

找不到指定的模块。
 有关错误的详细信息,请在已启用跟踪开关(/trace:error)的情况下运行 iisexpress.exe
。 

果然是IIS的关系。再从网上寻找解决方案。发现有人与我有相似的经历

于是,将Documents\IISExpress下的config目录整个删除了,重新运行“C:\Program Files (x86)\IIS Express>iisexpress.exe /trace:error”,这下正常了。而config目录也被自动重建。

再一次使用WebMatrix建立一个新的网站,顺利运行!

比较了下新旧config目录的区别,applicationhost.config文件中有许多不同的地方,但究竟是何处出了问题,也很难判断。大致能确定的是,这个问题应该为WebMatrix安装所引起的。因为安装WebMatrix前的IIS可是能够正常运行的。

解决这个问题,也花了不少时间,没什么好说的了,只希望微软以后对此能有所改善吧。

原文同步发布于我的博客

原文地址:https://www.cnblogs.com/sjyforg/p/3008840.html