ala*_*din 11 asp.net asp.net-mvc iis-7.5 asp.net-mvc-3
嗨,我想在Windows Server 2008 R2 SP1中发布MVC 3站点.我安装了MVC 3和MVC 2.当我创建一个MVC 2站点时,它工作正常,但MVC 3站点不起作用.我首先安装了MVC 3,当网站不能正常工作时,我安装了MVC 2并测试了另一个(MVC 2)网站,一切都很好.问题是MVC 3.
任何帮助请问这是错误:
错误摘要HTTP错误403.14 - 禁止Web服务器配置为不列出此目录的内容.详细错误信息模块DirectoryListingModule通知ExecuteRequestHandler处理程序StaticFile错误代码0x00000000请求的URL https://mywebsite.test.own:443 / 物理路径D:\ WebSite登录方法匿名登录用户匿名最可能的原因:
A default document is not configured for the requested URL, and directory browsing is not enabled on the server.
Run Code Online (Sandbox Code Playgroud)
你可以尝试的事情:
If you do not want to enable directory browsing, ensure that a default document is configured and that the file exists.
Enable directory browsing using IIS Manager.
Open IIS Manager.
In the Features view, double-click Directory Browsing.
On the Directory Browsing page, in the Actions pane, click Enable.
Verify that the configuration/system.webServer/directoryBrowse@enabled attribute is set to true in the site or application configuration file.
Run Code Online (Sandbox Code Playgroud)
链接和更多信息如果未在URL中指定文档,未为网站或应用程序指定默认文档,并且未对网站或应用程序启用目录列表,则会发生此错误.可以有意禁用此设置以保护服务器的内容.
查看更多信息»
Cra*_* W. 13
看起来请求转到静态文件处理程序并且根本没有进入MVC堆栈.有些事要检查......
在配置文件中,您是否在元素上将runAllManagedModulesForAllRequests设置为true?
您是否在为.NET 4和Integrated Pipeline模式配置的应用程序池中运行?
这就是我现在所能想到的,但如果我有其他想法,我会更新帖子.
Pau*_*ell 13
对于IIS 7.5 Windows Server 2008上的ASP.NET MVC 3.0,我发现我必须aspnet_regiis -i从该C:\Windows\Microsoft.NET\Framework\<version>文件夹运行.这解决了这个问题.
小智 6
为了防止这些解决方案对某人不起作用,我遇到了同样的问题,最后将其追踪到我的根目录下的一个名为与区域相同的文件夹.
例如,我有一个名为"Users"的区域,以及我的根目录下名为相同的文件夹.所以"domain.com/users"实际上是指向我的根驱动器下的文件夹而不是区域.
希望这有助于某人!
| 归档时间: |
|
| 查看次数: |
29681 次 |
| 最近记录: |