Windows Server 2008 r2 IIS: can’t allow access to file extension in request filtering

iis-7.5request-filteringwindows-server-2008-r2

I have a Windows Server 2008 r2 installation with configured FTP and IIS.

If I upload through FTP two files: "test.txt" and "test.abc" and then try to access these files through HTTP, then I can access only test.txt – then trying to access test.abc. results in 404.

I found this link: File Name Extensions

I followed the instructions to edit the Request Filtering. And denying works – if I set to deny ".txt" extension, then trying to access test.txt results in the same 404 error. But I don't manage to allow ".abc", adding it as allowed extension doesn't seem to have any effect.

Is there some other place where I need to make changes too in order to be able to access the file through HTTP? If I uninstall "Request Filtering", will then all files be accessible through HTTP?


Now I removed Request Filtering altogether and rebooted the server – but without change – accessing the ".abc" file still gives 404.
I'm connecting to this server through a VPN tunnel. Is it possible that VPN filters out such requests and returns 404 instead?

Best Answer

You were close, but not quite right. IIS will respond with 404 for any file that doesn't have a registered MIME Type. Here's how to fix it:

  • Open IIS Manager
  • Select the Server, Site, or Application that you want to add the mime type to
  • In the IIS sub-section, open the MIME Types feature
  • Add the extension for your ".abc" file with an appropriate mime type (for whatever type of file it actually is).

Here is the relevant documentation: http://www.iis.net/configreference/system.webserver/staticcontent/mimemap