Issues with Azure Bot Service File Attachments Across Regions

Chris Karagiannis 0 Reputation points
2025-02-17T14:40:18.4566667+00:00

I am encountering an issue with file attachments in my application that uses the Azure Bot Service. When users upload and attempt to download files via the bot, the behavior differs across regions:

  • From the region that the application is running, downloading the file fails with a 404 Not Found error.
  • Trying locally from another region, the same file download works fine with a 200 OK response.

There are no apparent differences in implementation or permissions that would explain this discrepancy. Could this be related to regional storage policies, CDN behavior, or network restrictions? Any insights or troubleshooting suggestions would be greatly appreciated.

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
902 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Sina Salam 18,861 Reputation points
    2025-02-17T18:16:07.19+00:00

    Hello Chris Karagiannis,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you are having issues with Azure Bot Service File Attachments Across Regions.

    These issues might be due to several factors and there are few ways to troubleshooting with the steps below:

    1. Compare the exact URLs used in both regions. Check for differences in the domain, path, query parameters (like SAS tokens), container names, blob names.
    2. Check the storage account's logs (Azure Storage Analytics logs or Azure Monitor) to see the requests coming in. See if the 404 requests are hitting the storage account and why they're failing. The logs might show the requested URL and the reason for the 404.
    3. Verify the network configuration of the storage account. Ensure that it allows traffic from the problem region. Check firewall settings, virtual networks, and whether public access is allowed.
    4. Check the replication status if using geo-redundant storage. Ensure that the data is replicated to the secondary region if that's the setup.
    5. Test accessing the URL directly from a machine in the problem region. Use curl or a browser to see if the file is accessible. This can help determine if it's an application issue or a network/storage issue.
    6. Check for any regional endpoints or DNS configurations that might be redirecting incorrectly.
    7. Ensure that the SAS tokens (if used) are valid in terms of expiration time and permissions. Also, check the clock synchronization between the client and server.
    8. Look into the possibility of the storage account being in a different region than the bot service, leading to higher latency or timeouts, but that might result in different errors.
    9. Test with a new file upload in the problem region and see if it can be downloaded immediately, to check for replication delays.
    10. Verify that the application code doesn't have any region-specific logic that might be altering the file paths or storage account references.

    I hope these steps are helpful! Do not hesitate to let me know if you have any other questions or clarifications.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.

    0 comments No comments

  2. kothapally Snigdha 1,620 Reputation points Microsoft Vendor
    2025-02-17T18:47:52.86+00:00

    Hi Chris Karagiannis,

    The issue you're experiencing with file attachments in the Azure Bot Service could indeed be related to several factors, including regional storage policies, CDN behavior, or network restrictions. Here are some potential troubleshooting suggestions

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.