alexjamesbrown / JoeBlogs

Wordpress / Metaweblog API Wrapper
53 stars 40 forks source link

Input string was not in a correct format #44

Open Corpy2014 opened 10 years ago

Corpy2014 commented 10 years ago

Hi there,

Just found this library and it seems pretty good so far but when trying to publish a new post the following error occurs:

Input string was not in a correct format.

I work in VB.NET and try to publish a post to a BlogEngine.NET Blog with the following code:

Dim wrapper As New MetaWeblogWrapper("http://www.example.com/metaweblog.axd", "user", "password")

Dim post As New Post() post.Title = "Title" post.Body = "Body"

wrapper.NewPost(post, True)

This error occurs on "MetaWeblogWrapper.cs" at line 37:

public virtual int NewPost(Post post, bool publish) { var content = Map.From.Post(post); return Convert.ToInt32(_wrapper.NewPost(this.BlogID, Username, Password, content, publish)); }

Any help on this is highly appreciated.

Thanks a lot,

Corpy