From your issue description, I understand you’re deploying asp.net app to Azure App Service with VS 2022.
Just to clarifying, is this the first App Service deployment that is failing to deploy (on your machine/VS), or it’s always been the case?
Possible cause:
-Typically, the issue could be due to TLS version mismatch or .NET reg keys missing.
-Self hosted agent connected to site using 1.0 or 1.1, we may encounter this error.
-If the customs agent's TLS version is less than 1.2, the destination will reject the request with TLS error since the destination will support only the TLS version of 1.2 and above.
Just to highlight, if you’re leveraging self hosted agent/custom agent for DevOps pipeline deployment. In this case, ensuring that the agent has >TLS1.2 installed helps.
It could be local machine issue communicating across the network with a TLS 1.2 -enabled. We have fixed this issue on a similar discussion thread. The steps involves editing registry on your local Windows machine, note! please exercise caution modify registry or you may attempt to deploy from another Windows machine ( as a test).
Reference: enable-tls-1-2-client#configure-for-strong-cryptography
Kindly let us know how it goes, I’ll be happy to follow-up with you further.