none
Getting Microsoft.Rest.Azure.CloudException while trying to download a file from datalakestore using .net sdk

    Question

  • public static void DownloadFile(string srcPath, string destPath)
            {
                var stream = _adlsFileSystemClient.FileSystem.Open(_adlsAccountName, srcPath);
                var fileStream = new FileStream(destPath, FileMode.Create);

                stream.CopyTo(fileStream);
                fileStream.Close();
                stream.Close();
            }

    the above is my method

    I am calling it in my mainmethod :

     DownloadFile(@"/HappyPath.txt", "C:\\Users\\samda\\Desktop\\HappyPath.txt");

    //the File exists is adls and the local path also exists and I have full read write access in the adls root folder still I am getting the Rest Exception on _adlsFileSystemClient.FileSystem.Open(_adlsAccountName, srcPath); line

    Monday, September 11, 2017 6:27 PM