Trying to understand why application dosn't run exe in Storage account

Gerald o 0 Reputation points
2024-08-13T15:02:12.9266667+00:00

HI,

I have create a storage account (storageAccountName) and a file share (exes) underneath. Under that I have create a directory (latest) ,and under that I have one exe (update.exe).

I have used the UNC path (storageAccountName.file.core.windows.net\exes) and credentials to access this location within Windows file explorer, and I can see the 'latest' folder and the exe underneath ( and run it) .

My problem is I have an app that , when you login in , check the current EXE is the correct version, if not, it goes to a (user) defined UNC path (storageAccountName.file.core.windows.net\exes) and looks for a 'latest' folder, and then run the exe.

I have added the same UNC that works in File explorer, but the app waits for 60 + seconds, then closes.

When this happens with 'normal' UNC paths, it means the application cannot find the latest folder at the UNC path ( or have the rights to view that folder.

As File explore works, i am not sure its rights, but it could be down to an app trying to access the Azure unc and not file explorer ( though , historically, if the file explorer can see/access the latest folder, the application would be ok to do so ).

Please can anyone advise what I am doing incorrectly, and how I might resolve this ? or how to set up logs to allow be to see what might be causing the issue ?

thanks in advance

Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,529 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Nehruji R 8,181 Reputation points Microsoft External Staff Moderator
    2024-08-14T12:44:27.2966667+00:00

    Hello Gerald o,

    Greetings! Welcome to Microsoft Q&A Platform.

    The issue you are facing could be related to application accesses the Azure File Share compared to Windows File Explorer. The application might not be able to authenticate against the Azure File Share using the same credentials that given to the Windows File Explorer. Make sure the application is using the correct credentials to access the Azure File Share. If the application runs under a different user context like a service account, ensure that the account has the necessary permissions to access the file share.

     

    Check whether the Azure File Shares use SMB 3.0 and if the application is expecting a different version, it might have trouble connecting. Verify that the application supports SMB 3.0 https://learn.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-windows.

     

    Verify the application might be facing network restrictions or firewall issues that are not affecting File Explorer.

    Ensure that the network configurations like firewalls, proxy settings allow the application to access Azure File Shares. Check if any firewall rules are blocking access to the Azure storage account's SMB endpoint. Verify that port 445 is open on your network, as this is required for SMB connections.

     

    Check if the application is sensitive to the case of the UNC path or might not correctly handle path formatting. Ensure that the UNC path is correctly formatted and case-consistent with how it appears in File Explorer. Use the exact path as seen in File Explorer. Ensure that the “Secure transfer required” setting on your storage account is configured correctly. If this setting is enabled, unencrypted connections will be blocked. If you have any firewall or virtual network rules set up on your storage account, make sure that the IP address or virtual network of your application is allow-listed.

     

    A similar issue is discussed here: https://stackoverflow.com/questions/34799151/exe-is-not-executing-from-schedule-task, https://learn.microsoft.com/en-us/answers/questions/926729/file-share-mount-in-windows-file-explorer.

     

    Here is the doc for your reference: https://learn.microsoft.com/en-us/troubleshoot/azure/azure-storage/files/connectivity/files-troubleshoot-smb-connectivity?tabs=windows

    To set up logging and diagnose the issue, you can enable diagnostic logging for your Azure storage account. This will help you track access attempts and errors:

    Go to your storage account in the Azure portal.

    Navigate to Monitoring > Diagnostics settings.

    Add a diagnostic setting to log File operations and send the logs to a Log Analytics workspace, Event Hub, or Storage account.

     

    Hope this answer helps! please let us know if you have any further queries. I’m happy to assist you further. 

    Please "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members

    0 comments No comments

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.