DefaultDocument unexpectedly not working on IIS7

I have a website that has been running on IIS7 for about 2 months. We have default documents configured to load the default.asp page when users go to the domain without the page. Suddenly this morning I get errors and the document does not load by default. If I type default.asp, the file loads just fine.

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

here is the section from my host.config application:

<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> 

I also verified that the modules physically exist on disk. I do not know any changes on this server, and the default document definitely worked until yesterday. The server is Windows Server 2008 x64 with IIS 7.0.

I reworked the application pool, loaded the server, deleted and re-entered the default documents. the error looks like it cannot find the default document module.

What else can I try?

+4
source share
1 answer

My colleague and I were chasing this morning, and someone from the IRC pointed us to a resolution. It turns out that IIS was having problems with the default b / c document, and the website root folder was marked as hidden. Apparently, when the folder is "Hidden", the document module cannot find it by default, and you will get the ERROR_FILE_NOT_FOUND displayed above.
We tested this behavior on the Dev server by setting the web root folder to Hidden and, of course, getting the same error for the default document. The Hidden attribute is removed and the document is loaded correctly by default.

I saw a lot of questions about this today, and no one posted an answer that matches our problem. I want to say thanks to someone who was at the IRC! And hopefully this will help others post it here.

+7
source

Source: https://habr.com/ru/post/1334213/


All Articles