How to send a post to your WordPress blog in C# and ASP.NET

XML-RPC service is used to send posts to WordPress blogs remotely. You can download the corresponding .NET library from here:

Add this library as a reference in your Visual Studio project. Then define it at the top of your code:

using CookComputing.XmlRpc;

The rest of the code is below.

public void wordpressPost()
    blogInfo newBlogPost = default(blogInfo);
    newBlogPost.title = "This is title";
    newBlogPost.description = "Post goes here";

    IgetCatList categories = (IgetCatList)XmlRpcProxyGen.Create(typeof(IgetCatList));
    XmlRpcClientProtocol clientProtocol = (XmlRpcClientProtocol)categories;

    clientProtocol.Url = ""; //your blog address comes here
    string result = null;

    result = "";

    result = categories.NewPage(1,
    "admin", //your blog admin user id
    "yourpassword", //your blog admin password

public struct blogInfo
    public string title;
    public string description;

public interface IgetCatList
    string NewPage(int blogId, string strUserName,
    string strPassword, blogInfo content, int publish);

6 thoughts to “How to send a post to your WordPress blog in C# and ASP.NET”

Leave a Reply