title: How to Authenticate WebHDFS with c#
body: <p>I have been attempting to upload files using c# into Hadoop using the WebHDFS REST API.
  This code works fine:<br/><pre><code>
      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&amp;op=OPEN","d:\tbible.txt");
      }
  </code></pre><br/>
  This code gets a 403 Forbidden:<br/><pre><code>
      using (var client = new System.Net.WebClient())
      {<br>
         client.UploadFile("http:/ /host:50070/webhdfs/v1/user/myuser/?user.name=myuser&amp;op=CREATE", "PUT", "d:\bible.txt");
      }
  </code></pre><br/>
  I have tried adding a network credential, with no luck.
  How do I authenticate to our Cluster from .NET?  The Cluster is Hortonworks HDP1.3 on RHEL5.
  (The extra spaces in this post are to keep http:/ / from being a link)
  Also, I would have liked to use Microsoft's hadoop SDK, but it is alpha and wont compile in my environment :(</p>