Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTTP Error 404.7 - Not Found The request filtering module is configured to deny the file extension

I'm trying to configure the default webpage for an IIS 7.5 website.

Request filtering is turned on. However .aspx pages are allowed, I've set default.aspx to be the default page for the website.

If I browse to localhost/default.aspx I get a webpage as expected.

IF I browse to localhost/ I get

HTTP Error 404.7 - Not Found The request filtering module is configured to deny the file extension.

Any ideas?

like image 658
mattbloke Avatar asked Nov 19 '12 14:11

mattbloke


1 Answers

It looks like the request filtering is actually filtering for a blank file name. Therefore you have to add this to the request filtering block in the web.config:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <security>
      <requestFiltering>
        <fileExtensions allowUnlisted="true">
          <remove fileExtension="." />
          <add fileExtension="." allowed="true" />
        </fileExtensions>
      </requestFiltering>
    </security>
  </system.webServer>
</configuration>

It's obvious now, but really I think its a massive gotcha.


More info: IIS 7 Not Serving Files - 404.7 Error

like image 54
mattbloke Avatar answered Oct 13 '22 20:10

mattbloke