IIS returning 404 on PDF File

http-status-code-404iisiis-10mime-typewindows-server-2016

I have a IIS 10.0 server that everything is working fine, with one issue. Any .pdf file returns 404. I know permissions are correct as all the image files in the same folder are working fine.

The PDF mime type exists in both the IIS root and the site and there is no Request filtering set.

Most the results on the web are for an older version of IIS, so I am out of ideas. Anyone else run into this?

Best Answer

Accessed the website on the local server and it displayed the entire error to me:

HTTP Error 404.11 - Not Found

The request contained a double escape sequence and request filtering is configured on the Web server to deny double escape sequences.

Things you can try:

Verify the configuration/system.webServer/security/requestFiltering@allowDoubleEscaping setting in the applicationhost.config or web.confg file.

Changed the setting in "Things to try" and instantly the pdf document was served.