The default document does not try all files in iis 8.5

I have a website with default settings for the default document in IIS 8.5 Windows 2012 R2.

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

When I look at a URL without a file name (mysite.com/Content/), IIS will only use the default.aspx file and the other files in the list (index.html). IIS tries to load default.aspx, and I get 404. It is strange that there is no default.aspx file in this directory, but index.html exists. If I look directly at index.html, the page renders correctly. According to Microsoft's documentation for the default document , it should try the next file in the list until it finds one that exists.

I explicitly added the web.config file to a subdirectory with

<defaultDocument enabled="true">
  <files>
      <clear />
       <add value="index.html" />
   </files>
 </defaultDocument>

IIS default.aspx. - ? - , , ?

+4
4
  • / URL-? ()
  • , , .

( , , , , -   else )

  1. , - .
  2. - , .
+1

: IIS/Application Pools " " "" . .

0

, , IIS , . , , IIS "HTTP 404 File Does not Exist".

, , IIS reset IIS.

-1

If you want to use index.html as the default page. you need to click the default iis website, after which you can click the default. Now! You can add an index as the default page.

-1
source

All Articles