As support ends for Microsoft Windows Server 2008 in January 2020, I have recently gone through migrating some websites to a new server running Windows Server 2016 and IIS 10.
The websites were migrated with the Web Deploy Tool.
Some of the websites did not work, and simply brought up a 500 Internal Server Error, bypassing custom error pages. This is always a sign that the cause of the error might be in the web.config file.
After a little experimenting with commenting out certain sections of the web.config file, I found two sections that had compatibility issues between IIS 7.5 and IIS 10.
The first was the "staticContent" section. I had used this to allow IIS to server .woff and .svg files. This is no longer needed for those types of files in IIS 10 so the section could be removed.
The other problem was where the IIS URL rewrite module had been used to automatically redirect from HTTP to HTTPs.
This module is not installed in IIS 10 by default.
You could download the URL Rewrite extension (https://www.iis.net/downloads/microsoft/url-rewrite
) but if you are only using this to redirect from HTTP to HTTPS then IIS 10 has an easier way of doing this:
• Open the IIS console and select the website
• On the "Actions" pane you will see the "HSTS" option below the "Configure" section
• Enable HSTS and "Redirect Http to Https"
There may be other causes of these problems too but they should be reasonably easy to identify by commenting out sections of the web.config file one at a time and testing, and a little research with your favourite search engine.