500 Internal Server Error after migrating from IIS 7.5 to IIS 10

John Avis by | November 4, 2019 | Computers & Internet Web Development Website Hosting

As support ends for Microsoft Windows Server 2008 I have recently gone through migrating some websites to a new server running Windows Server 2016 and IIS 10 but some of the websites did not work.

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"

(Source: https://www.hametbenoit.info/2018/10/22/windows-server-2019-you-can-now-easily-redirect-http-request-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.

Related Posts

Telstra BigPond and the message content rejected due to suspected spam error

by John Avis | December 9, 2020

A rant about Telstra's anti-small business mail server blacklisting policies.

Intermittent "Unable to read data from the transport connection: net_io_connectionclosed" errors

by John Avis | May 6, 2020

If you are having intermittent problems sending email in .NET using System.Net.Mail consider switching libraries.

tagInput: A simple jQuery plugin for tag entry using Bootstrap 4

by John Avis | October 15, 2019

For a website project I needed a way to enter multiple tags. I just wanted something simple that I could easily modify to suit my own needs, so I wrote my own.


There are no comments yet. Be the first to leave a comment!

Leave a Comment



...random postings about web development and programming, Internet, computers and electronics topics.

I recommend ASPnix for web hosting and Crazy Domains for domain registration.


Get the latest posts delivered to your inbox.