'Static files return Internal Server Error

I hosted a site called Paris on an IIS-server (Windows Server 2019), which have have 2 web applications

  • webParkingQueryApi
  • webParkingQueryApp

The file explorer path look like this:

  • Paris/ParkingQueryWebApi
  • Paris/ParkingQueryWebApp

Both application use the same AppPool, and both are .Net 4.6 Framework applications (one web API and one Web application).

AppPool: Name: Paris | Managed Pipeline: Integrated | .NET CLR version : 4.0 | Identity : {a service account in the AD}

Authentication Paris : anonymous. ParkingQueryWebApp : basic.

Problem: When I open webParkingQueryApp in browser all static files return "Internal Server Error".

Both applications work fine in my development server, but not in production.

I added permissions to the Service Account, DefaultAppPool, and Users so they can read, write and modify the Paris directory.

The Event Viewer throws an security warning when I refresh the site. It says : "A privileged service was called.", and it mentions Process Name: C:\Program Files\Google\Chrome\Application\chrome.exe. The security Id is my Windows account that I use to log into production.

EDIT

After I activated "Failed Request Tracing Rules" in IIS-manager and looked in the log files I found this error:

<RenderingInfo Culture="sv-SE">
  <Opcode>MODULE_SET_RESPONSE_ERROR_STATUS</Opcode>
  <Keywords>
   <Keyword>RequestNotifications</Keyword>
  </Keywords>
  <freb:Description Data="Notification">AUTHENTICATE_REQUEST</freb:Description>
  <freb:Description Data="ErrorCode">Either a required impersonation level was not provided, or the provided impersonation level is invalid.
 (0x80070542)</freb:Description>
 </RenderingInfo>

EDIT 2022-02-04

The static files return this information:

HTTP Error 500.0 | Module: IIS Web Core | Notification: AuthenticateRequest | Handler: StaticFile | Error Code:0x80070542 | Logon method: basic | Logon user: {my Windows account}.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source