question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CloudFileDirectory 404 on Creating of directory

See original GitHub issue
Sub Main()
        Dim storageAccount As CloudStorageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("StorageConnectionString"))
        Dim fileclient As CloudFileClient = storageAccount.CreateCloudFileClient()
        Dim share As CloudFileShare = fileclient.GetShareReference("vault")

        Dim rootdir As CloudFileDirectory = share.GetRootDirectoryReference()
        'Dim dir = rootdir.GetDirectoryReference("testing")
        Dim dir = rootdir.GetDirectoryReference("testing/spam1/spam2/spam3")

        dir.CreateIfNotExists()
    End Sub

I am using Azure File storage SDK and I am trying to create multiple levels of a directory in one step but it gives me a 404 error with the above code. If I just use “testing” it works but that would mean I would have to create each of the folder sections one by one?

Thanks

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
jnawkcommented, Jan 21, 2020

Even if the underlying API / back end can’t do this atomically, that’s no reason the SDK shouldn’t be able to. How about listening to your users?

4reactions
derekriverscommented, Feb 14, 2018

Feels quite hacky and impractical to have to create folder structures this way.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Azure File Storage: Create nested directories
This errors if directories one or two don't exist. Is there a way to create these nested directories with a single call? Microsoft...
Read more >
com.microsoft.azure.storage.file.CloudFileDirectory.create ...
Returns a reference to a CloudFileDirectory object that represents a directory in this directory. <init>. Creates an instance of the CloudFileDirectory class ...
Read more >
com.microsoft.azure.storage.file.CloudFile.create java code ...
Ensures you cannot create a file without first creating the directory it is located within. ... StorageException { CloudFileDirectory dir = this.share.
Read more >
CloudFileDirectory Class (Microsoft.Azure.Storage.File)
Creates the directory if it does not already exist. Returns a task that performs an asynchronous request to create the directory if it...
Read more >
How to solve 404 while working with azure.storage.fileshare?
Check the permissions on the file or share. Ensure you have the necessary permissions to access the resource, or else you will get...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found