Fixing the error: "IIS Error 500.19 - Internal Server Error"?

Earlier this year I had the pleasure of handling the following error:

HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

It was one of my websites that suddenly out of nowhere started showing this error on css, javascript and image files. Knowing I had done nothing on this site for months I was perplexed - why was I suddenly seeing this? Having seen this error before and seeing the following in the error message, I knew what to do.

Config Source:

   <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />

I removed the above mineMap from my web.config file and this solved the problem. The problem was that the hosting company I used had updated the configuration of their IIS. Adding this mime type to the general configuration (where it was also present in the configuration of my site). By removing this line everything worked as intended. An alternative fix would be to adjust this in the IIS.

Let me know in the comments down below if this was helpful to you :)