When debugging the website in VS 2022 I got this strange issue, Following steps sorted the issue for me.
- close VS 2022
- Delete the files in C:\Users\<username>\Documents\IISExpress\config folder
- Open the solution and tru running it again
Cheers,
Samitha