When you are trying to setup an IIS website on your local machine/new server, it’s very likely that you are going to get this error
HTTP Error 500.19 – Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
IIS could have had a better message of what is wrong, but we will have to live with this right now. Here’s the check lists you can go through:
Missing IIS features
Your IIS installation might be missing some critical features that are required to run the website (in this case, to parse the web.config). Make sure your IIS instance has all these features installed:
Missing IIS UrlRewrite module
The website might have URL Rewrite rules and your IIS does not have that installed. Simply go here https://www.iis.net/downloads/microsoft/url-rewrite, download and install it.