1

I have recently moved from a managed server to AWS running Windows 2012 R2 with IIS 8.5.

When I first open any website on my server or do a hard refresh, everything seems to be okay - no major concerns in the console and everything works as expected.

However, if I press F5 to reload the page, the console begins getting errors in it. The more times the page is refreshed, the more errors and almost always: 403 Forbidden. Sometimes they will go away, but often the console will have up to 10-15 of them. It's not just when I manually refresh, but when forms are submitted and the page is programmed to refresh as well.

This happens with image, css and js files. The js files are the biggest ones because this is causing errors in my webmail installation by preventing the TinyMCE from loading it's js files. This prevents the webmail's WYSIWYG editor and makes it useless.

I'm sure I'm missing something around the IIS cache; but, this isn't my area of exertise. I know there are a lot of resources on how to tweak IIS, I've read dozens of them, but I can't find a solution.

Here's a quick summary of current setup:

Setup:

  • Windows Server 2012 R2
  • IIS Version: 8.5 Sample site:
  • Testing in Chrome on Windows 10

Common Headers:

  • Keep Alive = true
  • Expire Content = false

Compression:

  • Dynamic compression = false
  • Static compression = true

Caching:

  • js = 2 days
  • css = 2 days
  • images = 30 days

Thanks!

  • support.microsoft.com/en-ca/help/943891/… Read IIS log files to learn the sub status code first. – Lex Li May 23 '18 at 2:32
  • Thanks @LexLi - there doesn't seem to be anything in the log files on IIS machine. The response header for the failed item is: HTTP/1.1 403 Forbidden Content-Type: text/html Server: Microsoft-IIS/8.5 X-Powered-By: ASP.NET X-Powered-By-Plesk: PleskWin Date: Wed, 23 May 2018 22:46:43 GMT Content-Length: 12566 Any suggestions are MUCH appreciated!! – Adam May 23 '18 at 22:58
  • After flushing IIS log... here's an entry for a failed item: 2018-05-23 23:01:35 W3SVC15 ip-AC1F1F8B 172.31.17.224 GET /wp-content/plugins/the-events-calendar/src/resources/css/tribe-events-full-mobile.min.css - 80 - 70.70.59.9 HTTP/1.1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/66.0.3359.181+Safari/537.36 - mapleridgeliquor.com mapleridgeliquor.com 403 502 0 12757 529 62 – Adam May 23 '18 at 23:04
1

Thank you @LexLi..

The suggestion to look into IIS logs got me moving again. From here, I was able to find a forum post that seemed relevant (https://forums.iis.net/t/1192952.aspx) because it showed the same error I was showing (403 502 combination).

The post was talking about IP restrictions, which made sense why it would fail when pressing F5 in succession but not after a period of time. I found the Dynamic IP Restriction setting and increased it... it seems to have fixed the problem.

Thanks again to @LexLi for the push.

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.