Hello @Jacky Poon,
Thank you for submitting your question on Microsoft Q&A.
Thank you for providing the screenshots. After reviewing them, I’ve identified some possible reasons for the 404 error you’re seeing on your Azure web app, along with steps to help resolve the issue.
Root Cause Analysis
The error message you’re seeing points to a resource ID that includes a deployment slot name is
aiohosting3/slots/bnb5frbwdrfpbwh8808d-hguazevhxf8h7dt
But according to your Deployment Slots screenshot, the actual slot names are
- aiohosting3 (Production)
- aiohosting3-bnb5frbwdrfpbwh8
- aiohosting3-hguazevhxf8h7dt
It looks like the error message is referring to a slot name that doesn’t exist or is formatted incorrectly
bnb5frbwdrfpbwh8808d-hguazevhxf8h7dt this is not a valid slot name in your environment.
Steps to Resolve the issue
- Review the URL you’re using
- Check that you’re using the correct URL for the slot where your app was deployed.
- For instance, if you deployed to aiohosting3-bnb5frbwdrfpbwh8, the URL should look like this
- https://aiohosting3-bnb5frbwdrfpbwh8.azurewebsites.net
- Avoid merging slot names
- The error suggests that a URL or configuration is mistakenly combining two slot names (bnb5frbwdrfpbwh8808d and hguazevhxf8h7dt), which isn’t valid.
- Go through your deployment settings and environment variables to make sure there’s no such combination.
- Confirm deployment slot setup
- Verify that your app is deployed to the intended slot.
- Test each slot’s URL separately to identify which one is working.
- Check the Azure Portal for slot availability
- Navigate to Azure Portal > App Services > aiohosting3 > Deployment Slots.
- Make sure the slot you want to access is present and running.
- Clear your browser cache or use incognito mode
- Sometimes, cached URLs or redirects can result in this type of issue.