0

I've just add to my site a SSL certificate and setup IIS to redirect all requests to https. After that I have a lot of issues with the site because the browser shows errors like

HTTP403: FORBIDDEN - The server understood the request, but is refusing to fulfill it.

This error is mainly for JavaScript files and images. Here a screenshot of Microsoft Edge DevTools.

DevTools Microsoft Edge

I googled a bit and some people complained because Microsoft Edge doesn't work properly. Then I tried with Firefox and I noticed another strange thing: the site is working fine but there are a lot of 403 in the Developer Tools`.

Firefox Developer Tools

I tried to add in the web.config a generic authorization for all users to the Scripts folder. Nothing changed.

  <location path="Scripts">
    <system.web>
      <authorization>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>

Do you have any helps?

Enrico
  • 3,592
  • 6
  • 45
  • 102
  • SSL is not about authorization but secure access of resources. So, Now you cannot call the resources whether images or js by http call since they are now only accessed by https. – Sonal Borkar Dec 27 '18 at 09:43
  • Thank you for you comment. As you can see, all resources have an `https` url. In my page I'm using for example `~/Scripts` – Enrico Dec 27 '18 at 09:56

1 Answers1

0

HTTP 403: FORBIDDEN could be caused due to number of reasons. You may need to try below options if any of these worked or causing issue:

1) Check if it is coming in all the browser.

2) Clear Cache and Cookies of the browser and then try again.

3) Check for Content Security Policy for safe access of resources

4) Check for file permissions in your wwwroot folder

5) More you can check in below link ....

CSS, Images, JS not loading in IIS

Sonal Borkar
  • 531
  • 1
  • 6
  • 12