How to Authenticate WebHDFS with c#
问题 I have been attempting to upload files using c# into Hadoop using the WebHDFS REST API. This code works fine: using (var client = new System.Net.WebClient()) { string result = client.DownloadString("http:/ /host:50070/webhdfs/v1/user/myuser/?op=LISTSTATUS"); client.DownloadFile("http:/ /host:50070/webhdfs/v1/user/myuser/tbible.txt?user.name=myuser&op=OPEN","d:\tbible.txt"); } This code gets a 403 Forbidden: using (var client = new System.Net.WebClient()) { client.UploadFile("http:/ /host