1
A
回答
1
如果您想以不登錄形式登錄安靜,解決方案:
string _username = <your azure username>
string _pass = <your azure password>
string _adlsAccountName = <name of your data lake store>
string _subId = <your subscription id>
string localFolderPath = @"<yourfolderpath>"
string localFilePath = Path.Combine(localFolderPath, "<yourFile>");
string remoteFolderPath = "/path on data lake/";
string remoteFilePath = Path.Combine(remoteFolderPath, "yourFileonDataLake");
var tenantId = "<your tenant id>"; //you can find this in right top corner on azure portal
var nativeClientApp_clientId = "1950a258-227b-4e31-a9cf-717495945fc2"; // you can use this one
var activeDirectoryClientSettings = ActiveDirectoryClientSettings.UsePromptOnly(nativeClientApp_clientId, new Uri("urn:ietf:wg:oauth:2.0:oob"));
var creds = UserTokenProvider.LoginSilentAsync(nativeClientApp_clientId, tenantId, _username, _password).Result;
_adlsClient = new DataLakeStoreAccountManagementClient(creds) { SubscriptionId = _subId };
_adlsFileSystemClient = new DataLakeStoreFileSystemManagementClient(creds);
如果u希望有日誌形式的數據湖僅使用LoginWithPromptAsyncMethod從UserTokenProvider。
這是設置。現在你可以使用_adlsFileSystemClient的上傳,追加等。希望這會幫助某人。
0
(Azure的數據湖隊在這裏):https://azure.microsoft.com/en-us/resources/samples/data-lake-analytics-dotnet-auth-options/
有幾個基本步驟: - 收集你需要驗證的信息 - 的ClientID,令牌的觀衆, tenantid等 - 使用該信息獲得證書。該回購協議中的GetCreds_User_Popup函數包含您需要的用於交互式最終用戶身份驗證的代碼 - 最後,使用creds創建您需要的.NET客戶端對象
相關問題
- 1. 通過網絡調用函數的最佳方式是什麼?
- 2. 使用C#通過網絡發送文件的最佳方式是什麼?
- 3. 什麼是我通過C#連接到離線數據庫的最佳方式
- 4. 測試API用戶認證的最佳方法是什麼?
- 5. 脫機用戶認證的最佳模式是什麼?
- 6. 在c#中連接數據庫的最佳方式是什麼?
- 7. 連接android和oracle數據庫的最佳方式是什麼?
- 8. 連接和使用C#中的sqlite數據庫的最佳方式是什麼?
- 9. 通過PHP使用Twitter API的最佳方式是什麼?
- 10. 通過httpconnection使用片段的最佳方式是什麼?
- 11. 通過HTTPS或SSH使用Git的最佳方式是什麼?
- 12. 保證這種SSH連接的最佳方式是什麼?
- 13. 什麼是通過用戶名和密碼通過WCF驗證用戶的最佳方式
- 14. 通過WCF發送通用庫的最佳方式是什麼?
- 15. 跟蹤TCP連接客戶端的最佳方式是什麼?
- 16. 在網絡中使用openGL的最佳方法是什麼?
- 17. 在Python中通過網絡發送對象的最佳方式是什麼?
- 18. IPC連接Qt4和Qt5過程的最佳方式是什麼?
- 19. 什麼是最簡單的方法來驗證可用的網絡連接?
- 20. 通過網絡管理Git的最快捷方式是什麼?
- 21. 驗證用戶上傳文件的最佳方式是什麼?
- 22. 安全認證用戶的最佳方式是什麼? (session,cookies,php,mysql)
- 23. 管理網站用戶照片的最佳方式是什麼?
- 24. 表明所有數據都已通過網絡接收的最佳方式?
- 25. 將iphone應用連接到mysql數據庫的最佳方式是什麼?
- 26. 什麼是使用Delphi的Web數據庫的最佳方式?
- 27. 首先通過優先考慮用戶關係來搜索社交網絡的最佳方式是什麼?
- 28. 使用信用卡連接兩個用戶以在網站上進行付款的最佳方式是什麼?
- 29. 存儲數據以使用jQuery的最佳方式是什麼?
- 30. 什麼是使用鈦創建數據庫的最佳方式