Before everyone reads this, I just want to say that i know that there are related threads out there, but I have either tried them or do not understand. With that being said here
I had this error with Visual Studion 2019, my project was NopCommerce 4.30 which is an ASP.Net Core 3.1 project. I added page "gouden-munten-buitenland" to be the starting page and I only got the error when going to that page. Turned out that Visual Studio generated an invalid applicationHost.config :
....
and
....
...
....
...
I removed the nodes identified as 'WRONG' and then it worked.