尝试将文件上传到ADLS时为什么会收到NullReferenceException?

时间:2018-08-08 13:32:52

标签: c# azure

我正在使用以下代码将测试文件上传到ADLS。我一直收到null引用错误,但无法弄清楚什么是null以及正在引用什么。我一直在尝试注释掉该行的某些部分,以找出它在什么时候变为空但没有成功。

var creds = new ClientCredential(CLIENTID, CLIENTSECRET);
            var clientCreds = ApplicationTokenProvider.LoginSilentAsync(TENANT, creds).Result;
            using (DataLakeStoreFileSystemManagementClient adlsFileSystemClient = new DataLakeStoreFileSystemManagementClient(clientCreds))
            {
                var g = adlsFileSystemClient.FileSystem.UploadFile(_adlsAccountName, "test.txt", "/test.txt", threadCount: 1, resume: false, overwrite: false);
            }

0 个答案:

没有答案
相关问题