Hello Surendran S Selvaraju,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
Problem
I understand that you are having "HTTP status code NotFound" and when you tried to validate Azure bot service using the "Test in Web Chat" there is no response and no error in logs.
Solution
To provide the best solution, despite all you have done. We do not know what you have done to troubleshoot and for the fact that there is no error log that makes more challenging.
However, the "HTTP status code NotFound" error typically indicates that the endpoint URL for your bot is incorrect or the bot service is not properly set up to respond at the expected endpoint.
Therefore, I will provide some steps to help troubleshoot and resolve this issue, kindly use the links in each independent solution for more detail step-by-step:
- Check that the endpoint URL in the Azure Bot Service configuration matches the actual endpoint where your bot is hosted. This is usually the
/api/messages
endpoint on your Azure App Service. You will need to be sure that the endpoint is correctly specified in the Azure Bot Channels Registration settings. Link: https://docs.microsoft.com/en-us/azure/bot-service/bot-service-troubleshoot-general-problems?view=azure-bot-service-4.0#notfound-error - In the Azure Portal, navigate to your Bot Channels Registration and ensure the Messaging endpoint is correct (e.g.,
https://<your-app-service-name>.azurewebsites.net/api/messages
). Verify that your Azure App Service is running and accessible. You can try accessing the service directly through a browser to see if it responds. Link: https://docs.microsoft.com/en-us/azure/bot-service/bot-service-manage-channels?view=azure-bot-service-4.0 and https://docs.microsoft.com/en-us/azure/app-service/overview - Enable Application Insights for both your bot and Azure App Service. This can provide detailed logs and telemetry that might help pinpoint the issue. Link: https://docs.microsoft.com/en-us/azure/bot-service/bot-service-manage-analytics?view=azure-bot-service-4.0 and https://docs.microsoft.com/en-us/azure/app-service/troubleshoot-diagnostic-logs
- You will need to check and ensure that Cross-Origin Resource Sharing (CORS) is configured correctly to allow requests from the Bot Framework. Link: https://docs.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-rest-api#enable-cors
- Confirm that the bot service has the necessary authentication and permissions configured. Check if there are any issues with the bot's app ID and password. Check that any required app registrations in Azure AD are correctly configured. Link: https://docs.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-rest-api#enable-cors
- Also, verify that there are no firewall rules or network security groups that might be blocking the traffic to your bot. Link: https://docs.microsoft.com/en-us/azure/app-service/networking-features
- Double-check your bot’s code and configuration files to ensure everything is set up correctly. Make sure the bot is properly handling the
/api/messages
endpoint and is not returning 404 for valid requests. Link: https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-overview?view=azure-bot-service-4.0 - Test your bot locally using the Bot Framework Emulator to see if it works correctly. This can help determine if the issue is with the bot itself or the deployment/configuration on Azure. Link: https://docs.microsoft.com/en-us/azure/bot-service/bot-service-debug-emulator?view=azure-bot-service-4.0
Accept Answer
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful ** so that others in the community facing similar issues can easily find the solution.
Best Regards,
Sina Salam