문제

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
도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top