DefaultDocument突然无法在IIS7上运行 [英] DefaultDocument suddenly not working on IIS7

查看:224
本文介绍了DefaultDocument突然无法在IIS7上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在IIS7上运行了大约2个月的网站。我们将默认文档设置为在用户转到没有页面的域时加载default.asp页面。突然今天早上,我收到错误,默认文件无法加载。如果我输入default.asp,文件加载就好了。

I have a website which has been running on IIS7 for about 2 months. We have the default documents set up to load a default.asp page when users go to the domain with no page. Suddenly this morning, I am getting errors and the default document will not load. If I type the default.asp, the file loads just fine.

错误信息:

模块:DefaultDocumentModule

通知:ExecuteRequestHandler

处理程序:StaticFile

错误代码:0x80070002

Error Info:
Module: DefaultDocumentModule
Notification: ExecuteRequestHandler
Handler: StaticFile
Error Code: 0x80070002

这是我的applicationhost.config中的一部分:

here is a section from my applicationhost.config:

<system.webServer>

    <asp>
        <cache diskTemplateCacheDirectory="%SystemDrive%\inetpub\temp\ASP Compiled Templates" />
    </asp>

    <defaultDocument enabled="true">
        <files>
            <clear />
            <add value="Default.asp" />
            <add value="Default.htm" />
            <add value="index.htm" />
            <add value="index.html" />
            <add value="iisstart.htm" />
        </files>
    </defaultDocument>

    <directoryBrowse enabled="false" />

    <globalModules>
        <add name="UriCacheModule" image="%windir%\System32\inetsrv\cachuri.dll" />
        <add name="FileCacheModule" image="%windir%\System32\inetsrv\cachfile.dll" />
        <add name="TokenCacheModule" image="%windir%\System32\inetsrv\cachtokn.dll" />
        <add name="HttpCacheModule" image="%windir%\System32\inetsrv\cachhttp.dll" />
        <add name="StaticCompressionModule" image="%windir%\System32\inetsrv\compstat.dll" />
        <add name="DefaultDocumentModule" image="%windir%\System32\inetsrv\defdoc.dll" />
        <add name="DirectoryListingModule" image="%windir%\System32\inetsrv\dirlist.dll" />
        <add name="ProtocolSupportModule" image="%windir%\System32\inetsrv\protsup.dll" />
        <add name="HttpRedirectionModule" image="%windir%\System32\inetsrv\redirect.dll" />
        <add name="ServerSideIncludeModule" image="%windir%\System32\inetsrv\iis_ssi.dll" />
        <add name="StaticFileModule" image="%windir%\System32\inetsrv\static.dll" />
        <add name="AnonymousAuthenticationModule" image="%windir%\System32\inetsrv\authanon.dll" />
        <add name="RequestFilteringModule" image="%windir%\System32\inetsrv\modrqflt.dll" />
        <add name="CustomErrorModule" image="%windir%\System32\inetsrv\custerr.dll" />
        <add name="HttpLoggingModule" image="%windir%\System32\inetsrv\loghttp.dll" />
        <add name="RequestMonitorModule" image="%windir%\System32\inetsrv\iisreqs.dll" />
        <add name="IsapiModule" image="%windir%\System32\inetsrv\isapi.dll" />
        <add name="IsapiFilterModule" image="%windir%\System32\inetsrv\filter.dll" />
        <add name="CgiModule" image="%windir%\System32\inetsrv\cgi.dll" />
        <add name="FastCgiModule" image="%windir%\System32\inetsrv\iisfcgi.dll" />
        <add name="ManagedEngine" image="%windir%\Microsoft.NET\Framework\v2.0.50727\webengine.dll" preCondition="integratedMode,runtimeVersionv2.0,bitness32" />
        <add name="ConfigurationValidationModule" image="%windir%\System32\inetsrv\validcfg.dll" />
        <add name="ManagedEngine64" image="%windir%\Microsoft.NET\Framework64\v2.0.50727\webengine.dll" preCondition="integratedMode,runtimeVersionv2.0,bitness64" />
        <add name="RewriteModule" image="%SystemRoot%\system32\inetsrv\rewrite.dll" />
        <add name="ManagedEngineV4.0_32bit" image="C:\Windows\Microsoft.NET\Framework\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness32" />
        <add name="ManagedEngineV4.0_64bit" image="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness64" />
        <add name="WebDAVModule" image="%SystemRoot%\system32\inetsrv\webdav.dll" />
        <add name="WindowsAuthenticationModule" image="%windir%\System32\inetsrv\authsspi.dll" />
    </globalModules>

我还验证了模块实际存在于磁盘上。我不知道这台服务器有任何变化,默认文件肯定一直工作到昨天。服务器是带有IIS 7.0的Windows Server 2008 x64。

I have also verified that the modules physically exist on disk. I am not aware of any changes on this server, and the default document has definitely been working up till yesterday. Server is Windows Server 2008 x64 with IIS 7.0.

我已经回收了应用程序池,启动了服务器,删除并重新输入了默认文档。错误看起来无法找到默认的文档模块..

I've recycled the app pool, booted the server, removed and reentered the default documents. the error looks like it cant find the default document module..

我还能尝试什么?

推荐答案

我的同事和我整个上午一直在追逐这个问题,IRC的某个人向我们指出了决议。事实证明IIS在使用默认文档b / c时遇到问题,网站根文件夹已被标记为隐藏。显然,当文件夹被隐藏时,默认文档模块找不到它,你得到上面显示的ERROR_FILE_NOT_FOUND。

我们通过将web根文件夹设置为Hidden并确定已经在Dev服务器上验证了这种行为默认文档的错误相同。删除了Hidden属性并正确加载了默认文档。

My coworker and I have been chasing this all morning and someone on IRC pointed us to the resolution. Turns out that IIS was having trouble with the default document b/c the website root folder had gotten marked as Hidden. Apparently, when the folder is Hidden, the default document module cannot find it and you get the ERROR_FILE_NOT_FOUND shown above.
We verified this behavior on a Dev server by setting the web root folder to Hidden and sure enough got the same error for the default document. Removed the Hidden attribute and the default document loads correctly.

我今天看到了很多关于此的问题,没有人发布适合我们问题的答案。我要感谢IRC上的任何人!希望这会帮助其他人在这里发布。

I have seen a lot of questions about this today, and no one has posted an answer that fit our problem. I want to say thanks to whoever that was on IRC! And hopefully this will help others to post it here.

这篇关于DefaultDocument突然无法在IIS7上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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