新建了個網站,想把之前所有的部落格都遷移過去。
學習進行的很順利,就在我開始測試另外一個部落格vwww.aboutdnn.net時,一個錯誤出現了:
伺服器總是報告"Conversion from string "" to type 'Integer' is not valid",對於這個出錯,我很是費解,一樣的程式碼,為什麼換了一個部落格就開始出問題呢?Rich Strahl 的一篇文章解答了我的問題: MetaWebLog API and Blog Writers
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
CookComputing.XmlRpc.XmlRpcFaultException: Server returned a fault exception: [0] Conversion from string "" to type 'Integer' is not valid.
at CookComputing.XmlRpc.XmlRpcSerializer.DeserializeResponse(XmlDocument xdoc, Type returnType)
at CookComputing.XmlRpc.XmlRpcSerializer.DeserializeResponse(Stream stm, Type svcType)
at CookComputing.XmlRpc.XmlRpcClientProtocol.ReadResponse(XmlRpcRequest req, WebResponse webResp, Stream respStm, Type returnType)
at CookComputing.XmlRpc.XmlRpcClientProtocol.Invoke(Object clientObj, MethodInfo mi, Object[] parameters)
at CookComputing.XmlRpc.XmlRpcClientProtocol.Invoke(MethodInfo mi, Object[] Parameters)
at XmlRpcProxy16e9c151-0058-43cc-ab6c-b59358b72772.NewPost(String , String , String , Post , Boolean )
at AlexJamesBrown.JoeBlogs.MetaWeblogWrapper.NewPost(Post content, Boolean publish)
at BlogMigrator.Form1.button1_Click(Object sender, EventArgs e) in C:\Documents and Settings\NL186000\My Documents\Visual Studio 2008\Projects\BlogMigrator\BlogMigrator\Form1.cs:line 40
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Plurals Light
這裡有一個library:
Joe Blogs
在codeplex上也有一個:Joe Blogs
這個library完整的實現了對WordPress 的API,同時也支援MetaWeblog API,所以也可以用來處理MetaWeblog API
這裡是的使用說明:http://www.alexjamesbrown.com/geek/development/dotnet/using-joeblogs/
Migrating content from MovableType or TypePad to Drupal with Python