Pregunta

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
¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top