If you encounter an error in Azure App Service, enable diagnostic logging to determine what the error is.
https://learn.microsoft.com/en-us/azure/app-service/troubleshoot-diagnostic-logs
In addition, if you can't solve the problem from the diagnostic log, we can help if you share the detailed error details.