title: JoeBlogs Wordpress C# Add category and upload image
body: <p>I am using JoeBlogs <a href="https://github.com/alexjamesbrown/JoeBlogs" rel="nofollow">https://github.com/alexjamesbrown/JoeBlogs</a> to handle stuff on some of my wordpress websites. I am having some problems with creating a new category and uploading a picture.</p>
  
  <p>Here is my code for creating a new category:</p>
  
  <pre><code>var wpWrapper = new WordPressWrapper("http://192.168.1.2/xmlrpc.php", "admin", "admin");
  wpWrapper.NewCategory("some description", 0, "cat1", "slug here");
  </code></pre>
  
  <p>I am getting the following error from CookComputing library:</p>
  
  <pre><code>XmlRpcServerException: Not Found
  </code></pre>
  
  <p>I get the same error for uploading a picture. I've tried 2 versions of uploading a picture with uploadfile and newmediaobject. 
  Here is what I've made with the newmediaobject:</p>
  
  <pre><code>var blog = new WordPressWrapper("http://192.168.1.2/wordpress", "admin", "admin");
  
  byte[] imageData = System.IO.File.ReadAllBytes("desert.jpg");
  
  var img = blog.NewMediaObject(new MediaObject { Bits = imageData, Name = "desert.jpg", Type = "image/jpeg" });
  </code></pre>
  
  <p>I am getting this error: <code>Response from server does not contain valid XML</code></p>
  
  <p>Here is my second try with uploadfile:</p>
  
  <pre><code>var blog = new WordPressWrapper("http://192.168.1.2/wordpress", "admin", "admin");
  
  wpWrapper.UploadFile("desert.jpg", "desert.jpg", true,"image/jpeg");
  </code></pre>
  
  <p>I am getting the same error, with the invalid XML (just like the first try with mediaobject).</p>
  
  <p>What do you guys suggest ?</p>
  
  <p>I am open to other libraries that could help me achieve this.</p>