Avatar of yadavdep
yadavdep
Flag for India

asked on 

Azure File Share Error in create a new file share

My client gave me to work on windows azure storage.

He wants to store his files in container, blobs.

He gave these URLs
https://xxx.blob.core.windows.net/
https://xxx.queue.core.windows.net/
https://xxx.table.core.windows.net/


Now, I trying to create a new file share using the client lib.
I have written this code.

//Create a CloudFileClient object for credentialed access to File storage.
            CloudFileClient fileClient = storageAccount.CreateCloudFileClient();

            CloudFileShare share = fileClient.GetShareReference("sampleshare");

            share.CreateIfNotExists();
            //Get a reference to the root directory for the share.
            CloudFileDirectory rootDir = share.GetRootDirectoryReference();

Open in new window



When I run this code I am getting an error
The remote name could not be resolved: 'xxx.file.core.windows.net'

I am not sure why this error is coming?
Can any one help me out here please
//Create a CloudFileClient object for credentialed access to File storage.
            CloudFileClient fileClient = storageAccount.CreateCloudFileClient();

            CloudFileShare share = fileClient.GetShareReference("sampleshare");

            share.CreateIfNotExists();
            //Get a reference to the root directory for the share.
            CloudFileDirectory rootDir = share.GetRootDirectoryReference();

Open in new window

AzureASP.NET.NET Programming

Avatar of undefined
Last Comment
Raheman M. Abdul

8/22/2022 - Mon