Link to home
Start Free TrialLog in
Avatar of yadavdep
yadavdepFlag 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

ASKER CERTIFIED SOLUTION
Avatar of Raheman M. Abdul
Raheman M. Abdul
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial