ASP.NET Core 2.0 Upgrade causes HTTP 502

A lot of guys run into an error during the upgrade fom ASP.NET Core 1.x to ASP.NET Core 2.0: HTTP Error 502.5 - Process Failure The reason is very .....