Visual studio 2022 - The IIS Express applicationHost.config file contains invalid entries and must be corrected before you can open project

Shunmuga Priya Kandasamy (INFOSYS LIMITED) 131 Reputation points Microsoft External Staff
2022-01-27T09:32:28.76+00:00

Hi Team,

The microsoft visual studio 2019 web and webapi projects when opened in visual studio 2022, getting the below error and cannot open it.Please guide me

The IIS Express applicationHost.config file contains invalid entries and must be corrected before you can open project

169031-image.png

Windows development Internet Information Services
Developer technologies C#
{count} votes

1 answer

Sort by: Most helpful
  1. Ken Tucker 5,861 Reputation points
    2022-01-27T10:25:42.01+00:00

    In the folder your solution is in delete the hidden folder .vs and try again. This will cause the file to be regenerated when you open the solution again.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.