问题
I need to access files using standard file API in a Service Fabric service. My application read from files and write to files that are stored in a File Share; each node process a different part of the data.
I'm using the "SetupEntryPoint" to run a batch file with a "net use" command to mount a local drive to my file share but it fails (both on my local machine and when deployed on Azure). I'm referring to this article. The same batch runs well on a regular virtual machine but fails on a Fabric node.
I would like an example of how this can be achieved. Thanks
回答1:
I've been using this project for a while to map drives in code and it works well on service fabric. You should be able to put this in your code before your file access calls.
来源:https://stackoverflow.com/questions/42365071/how-to-mount-a-file-share-in-azure-service-fabric