500.19 error or 502.5 error when hosting asp.net core 2 application inside IIS

While deploying asp.net core 2 to IIS, you may get one of these errors  or both  🙂 500.19 Internal Server error The first of the issue is 500.19 error when trying to host an asp.net core 2.0 application inside IIS7. What you get might be  something like below   This one was quite simple,turned out…