My aplication was set up to run on Local IIS using the HTTPS protocol, but it wasn't configured in IIS. I had to add that protocol in IIS by going to Default Web Site>Edit Bindings. After that I could load the aplication in VS 2022.