0

Struggling to get my head round this one,

I basically have a licence for software that I need to run on my REST API, and this software comes with an SDK containing a method to retrieve Licence from a path.

For example: myObj.SetLicenceFilePath(@"C:...")

However, as this is written now on an API I cannot access Drives, so I have created an Azure FileShare with directory and all the licence docs in this directory.

I'm currently using the azure SDK in C# to access my storage account and the fileshare, but now I don't know if it's possible to use the retrieved directory?

Any help on this would be great, Thanks

p.s This is the current storage code that works...up until I try setting the path. SetLicencePath expects a string.

CloudStorageAccount cloudStorageAccount = CloudStorageAccount.Parse(DM.azureConn); 
CloudFileClient fiCl = cloudStorageAccount.CreateCloudFileClient();
CloudFileShare share = fiCl.GetShareReference("MyShare");

CloudFileDirectory root = share.GetRootDirectoryReference();
CloudFileDirectory dir = root.GetDirectoryReference("MyDir");

??? obj.SetLicencePath(dir.StorageUri.PrimaryUri.AbsoluteUri); ???
  • Where is your code running? Please note that you can't map a File Share to a network drive in an Azure WebApp. – Gaurav Mantri Mar 30 '20 at 09:48
  • @GauravMantri, that's what I was afraid of, is there any other way from within an AppService API on Azure to get this 'file path'? The code there is running in a class method on the API that is called by a route controller – Will Smith Mar 30 '20 at 10:00
  • I can't think of any other way in an AppService. May be host your app in an Azure VM? There you will be able to map a File Share as a Network drive. – Gaurav Mantri Mar 30 '20 at 10:07

0 Answers0