Symptoms
-
CSS is not working for a website or some images (.webp) are not loaded with the following error in a browser console:
net::ERR_ABORTED 500 (Internal Server Error)
- HTML pages are not loaded with this error:
The page cannot be displayed because an internal server error has occurred.
-
Failed Request Tracing in Domains > example.com shows the following error:
PLESK_ERROR: ModuleName CustomErrorModule
Notification SEND_RESPONSE
HttpStatus 500
HttpReason Internal Server Error
HttpSubStatus 19
ErrorCode Cannot create a file when that file already exists.
(0x800700b7)
ConfigExceptionInfo ?C:Inetpubvhostsexample.comhttpdocsweb.config ( 45) :Cannot add duplicate collection entry of type ‘mimeMap’ with unique key attribute ‘fileExtension’ set to ‘.webp’
Cause
Incorrect “staticContent” section in the web.config
file: it is duplicated on IIS level and in domain’s configuration file.
Resolution
-
Navigate to Domains > example.com > File manager and open the file
web.config
. -
Add the
<clear />
before the line number reported in the error message:43 <staticContent>
44 <clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" />
45 <clear /> <!-- Add this -->
46 <mimeMap fileExtension=".webp" mimeType="image/webp" />
47 </staticContent>
Note: When many domains are affected, apply the same solution for %windir%system32inetsrvconfigapplicationHost.config
file or remove the line reported in the error from it.