I am experiencing the same error. After successfully publishing a function in the Flex service, I encounter an error when trying to publish from Visual Studio 2022 that says the service is unavailable. It is not possible to publish again. If I create a new function from scratch, Visual Studio can publish it, but this is impossible to do in a productive environment. The error I encounter is as follows:
Publish has encountered an error.
The Publish URL https://test-solidaria-whatsapp.scm.azurewebsites.net/ is unreachable. The application may be stopped, restarting or unavailable. Try again once the publish target is available.
A diagnostic log has been written to the following location:
"C:\Users\migue\AppData\Local\Temp\tmp5572.tmp"
The text of the file says the following:
Microsoft.WebTools.Shared.Exceptions.WebToolsException: The Publish URL https://test-solidaria-whatsapp.scm.azurewebsites.net/ is unreachable. The application may be stopped, restarting or unavailable. Try again once the publish target is available.
at Microsoft.WebTools.Azure.Functions.Publish.ZipDeployPublishProfileConfiguration.<PrePublishAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Publish.Framework.Profiles.PublishProfilesServiceImpl.ServerProjectProfilesManager.<RunPublishTaskAsync>d__76.MoveNext()
I have three functions with the same problem