0

I am hosting my website with a hosting service provider. The website loads perfectly when the request is HTTP (i.e. http://example.com), but the web server (IIS) fails to load static files (css, js, images) over HTTPS (i.e. https://example.com), I get "Failed to load resource: the server responded with a status of 403".

I checked this link CSS, Images, JS not loading in IIS and it says maybe I need to set the identity of the anonymous user to the App Pool Identity. The problem is that I asked my hosting service provider to perform that task, but the provider told me that they do not do that on application pool identity because this increases security leaks with impersonating authentication.

I am using .NET 5.0 and I tried to modify the launchSettings.json file to allow anonymousAuthentication, but that didn't work, do you know what else can I do to solve this issue?

csta19
  • 25
  • 5
  • Set authentication with anonymous authentication may actually affect security, have you tried the answer in the post you provided which about windows permission ? – Hury Shen Aug 05 '21 at 01:33
  • Thank you @HuryShen I did try the windows permission, but it didn't solved the issue. I am using a Let's Encrypt SSL certificate so I don't know if I am missing something. – csta19 Aug 10 '21 at 16:38
  • I think you can [create](https://support.microsoft.com/) a support ticket for this, microsoft engineer will help find the root cause. – Hury Shen Aug 12 '21 at 07:30
  • Thank you @HuryShen, I migrated the website to another hosting provider and the problem is gone, so I think it was the hosting firewall that caused the problem. – csta19 Aug 13 '21 at 20:57
  • Ok, that's fine. – Hury Shen Aug 16 '21 at 01:57

1 Answers1

0

Summarize from the comments:

The problem was caused by hosting firewall. Migrated the website to another hosting provider, then the problem is gone.

Hury Shen
  • 14,948
  • 1
  • 9
  • 18