IIS 500.0 AuthenticateRequest error for static files
Asked Answered
P

3

7

I have tried to setup an website in a new server and I get this error for all static files html/css/js, etc.

HTTP Error 500.0 - Internal Server Error

The page cannot be displayed because an internal server error has occurred. enter image description here

AuthenticateRequest is happening for StaticFile and fails somewhere. Our site uses windows based authentication, so we enabled only Windows based authentication as same as other server where it works fine.

  1. Added IIS_IUSRS permissions to the website folder
  2. Tried the explanation given https://blogs.msdn.microsoft.com/chaun/2014/09/02/error-500-0-internal-server-error-authenticaterequest-staticfile-0x80070542/

  3. Verified with another working server installed features.

Still could not figure out after 2 days what is going wrong in our IIS site setup.

Piers answered 22/9, 2017 at 14:56 Comment(3)
It seems that you have other web apps installed on this machine. Use failed request tracing and you might find which app/module returns 500.0 instead of IIS default components. Or if you simply switch to a clean server.Patois
What's the user of the application pool? Read/Execute permissions on the website folder?Fatwitted
I am having this problem only with Chromium and new Edge and only when working from another login on the same machine. Firefox and old IE are working fine. Reason unclear.Indonesian
T
4

(sorry if this answer is not a perfect match, but it's the closest question I could find)

I had a similar issue here, but running IISExpress 10 started from VS2015. I tried everything listed in https://blogs.msdn.microsoft.com/chaun/2014/09/02/error-500-0-internal-server-error-authenticaterequest-staticfile-0x80070542/ with no luck, so the only way I could make it work in the development environment was running IISExpress as Administrator (which should not affect at all as my account is already an administrator and the correct impersonation configs were in in place):

C:\WINDOWS\system32>"C:\Program Files\IIS Express\iisexpress.exe" /config:"C:\Users\med\git\project\Solution\.vs\config\applicationhost.config" /site:App.Server
Topside answered 6/12, 2018 at 11:39 Comment(3)
Apparently running VS2017 as an administrator has the same effect.Event
probably yes, but I prefer to run as fewer things as possible as administrator.Topside
You can use task manager to copy the command line from Visual Studio: Start your project in Visual Studio, then open the task manager, show the command line column, select the IISExpress line and and then press Ctrl+C to copy the complete line.Indonesian
S
1

I had this issue using IIS Express launched from Visual Studio 2019 when debugging my website. The symptom was that scripts etc. were read correctly from the physical location by IIS Express, but some font files (.woff, .ttf) were refused with this error code.

Running Visual Studio as administrator worked around the issue, but this is not ideal as it may hide other issues. Modifying the permissions on the physical location to give <PC Name>\IIS_IUSRS read\execute permissions fixed the fault.

Springfield answered 21/7, 2020 at 8:38 Comment(0)
O
0

I had this issue when migrating my site to Server 2022, where the application pool was running as a specific Active Directory account.

It appears that on Server 2022 the IIS_IUSRS group is not included in the Local Security Policy for "Impersonate a client after authentication" as standard. Or at least it wasn't on my customer's server, and the group policy for the client did not allow for it to be added.

As a result I found the following answer on ServerFault fixed my issue...

  • In IIS go to the website, and select Authentication...

enter image description here

  • Then select "Anonymous Authentication"
  • Either click "Edit..." on the Actions panel, or via right-click
  • Select "Application pool identity"

enter image description here

Onto answered 24/9, 2024 at 12:10 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.