0

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?

  • Are you accessing the server directly on the same network or through a firewall/waf? – Mike M Apr 10 '18 at 18:51
0

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.

  • Can show a sanitized version of the URL (without the domain part)? Does the file name or path contain a plus (+) sign? – DmitryK Apr 10 '18 at 22:57
  • I do not have it handy at this second, but I can do that later. but yes the file does have a + sign then a space (or %20) beside it. – alexander7567 Apr 10 '18 at 23:07
  • 1
    So the plus sign is what causes that "double escape sequence" error. It treats the (+) sign as the escaping character. You can either get rid of that sign in the file name or (as you mentioned) to enable the allowDoubleEscaping setting. – DmitryK Apr 11 '18 at 0:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.