-1

I am developing C# Windows application that uses joeblogs WordPress api to post to WordPress blogs via this application. I have tested sample program with localhost url as localhost/wordpress/xmlrpc.php, it worked fine and posted successfully but when I changed url to http://wordpress.com/xmlrpc.php to post online then it generates below mentioned exception

An unhandled exception of type 'CookComputing.XmlRpc.XmlRpcFaultException' occurred in CookComputing.XmlRpcV2.dll

Additional information: Server returned a fault exception: [401] Sorry, you are not allowed to publish posts on this site.

Code:

Image

Solutions I tried were:

  • Enabling xmlrpc which is not more available in 3.5 and above versions because it's been permanently enabled in latest versions
  • Checked my username and password and both are correct
Community
  • 1
  • 1
Raj
  • 13
  • 1
  • 5
  • What role does the user have that you are posting as? – Alex Jul 06 '13 at 15:34
  • I have an only administrator role there at my blog and i ain't mentioning any author while posting from c# application as you can see my code in my question and now as you pointed that there must be roles you need to specify while posting remotely so do you want me to add post.author sort of statement to explicitely define who is trying to post on my blog?????? Please tell me what to do????? – Raj Jul 08 '13 at 05:17
  • You should have pasted the code into your question, not uploaded a screenshot – Alex Jul 08 '13 at 08:20
  • Might want to change your password too, now that you've let the whole world have it – Alex Jul 08 '13 at 08:22
  • I got my answer Sir... It was just a wee stupidous mistake i was commiting in URL 'm publishing my posts at but now it went away... Thanks for your concern and marvellous api as well...! – Raj Jul 09 '13 at 07:40
  • Check out your blog and thanks to me later... – Postback Jul 09 '13 at 10:35
  • This question can be closed as "typo", since it is not going to be of use to future readers. – halfer Sep 20 '18 at 09:06

1 Answers1

0

Looking at your code you are trying to publish directly to wordpress.com.
The URL should be starshahid20.wordpress.com

Understandably, you don't have permission to write to wordpress.com

Alex
  • 37,502
  • 51
  • 204
  • 332