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
Question
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:
Solutions I tried were:
Solution
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