IIS 6.0突然显示目录列表而不是MVC 3应用程序 [英] IIS 6.0 suddenly shows directory listing instead of MVC 3 app

查看:116
本文介绍了IIS 6.0突然显示目录列表而不是MVC 3应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一夜之间,一个(内部的,幸运的)MVC网络应用程序已停止为我工作,据我所知没有任何改变。应用程序本身绝对没有在过去两天内修改过,IIS也是如此。

Over night an (internal, luckily) MVC web application has stopped working for me, without anything being changed as far as I know. The application itself absolutely hasn't been tinkered with in the last two days and the same goes for IIS.

问题是我得到了我的www-的目录列表文件夹而不是应用程序默认操作( / Home / Index )。

The problem is that I get a directory listing of my www-folder instead of the applications default action (/Home/Index).

我的www文件夹包含标准内容:

My www-folder contains the standard stuff:

bin
Content
Scripts
Views
Global.asax
Web.config

我试过:


  • 将特定页面设置为开始操作但不能解决问题。

  • 重新启动IIS中的网页

  • 在IIS中启用/禁用默认内容页面。没有帮助,但如果我将它放在www文件夹中,IIS确实会接收到Default.html。

现在,这发生过一次。在我度假的时候,通过重新启动整个万维网发布服务解决了这个问题。虽然这次也可能有用,但我想在暂时解决之前找出问题的根源,以便让它在未来再次发生。因此,当WWW Publishing Service重新启动可能会让网站再次运行时,我宁愿在解决这个问题之前先了解它为什么会发生这种情况。

Now, this has happened once before. At the time I was on vacation and it was solved by restarting the entire World Wide Web Publishing Service. While it might work this time as well, I'd rather figure out the root of the problem before temporarily fixing it just to have it happen again further down the road. So while a WWW Publishing Service restart might get the site running again I'd rather understand why it happened in the first place before fixing it this way.

最后,请注意我在同一个IIS服务器上运行其他MVC应用程序并且从未遇到过这个问题。

Finally, note that I'm running other MVC apps on the same IIS server and have never gotten this problem with them.

推荐答案

我有一个类似的问题。
IIS根路径已由同事更改。
解决方案是在默认网站的高级设置中修复物理路径。

I had a similar problem. The IIS root path had been changed by a collegue. The solution was to fix the "Physical Path" in the "Advanced Settings" of the Default Web Site.

这篇关于IIS 6.0突然显示目录列表而不是MVC 3应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆