开发者

When I run code to post blog i get error: Proxy Authentication required

i am writing code in vb to post blog to wordpress.

here is the code

Imports CookComputing.XmlRpc

Public Structure blogInfo
    Public title As String
    Public description As String
End Structure





Public Class Form1
  Public Interface IgetCatList
        <CookComputing.XmlRpc.XmlRpcMethod("metaWeblog.newPost")> _
        Function NewPage(ByVal blogId As String, ByVal strUserName As String, ByVal strPassword As String, ByVal content As blogInfo, ByVal publish As Integer) As String
    End Interface

    Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click



        Dim categories As IgetCatList
        Dim clientprotocol As XmlRpcClientProtocol
        Dim txt As String

        Dim newBlogPost As blogInfo
        newBlogPost.title = TextBox1.Text
        newBlogPost.description = TextBox2.Text


        categories = CType(XmlRpcProxyGen.Create(GetType(IgetCatList)), IgetCatList)
        clientprotocol = CType(categories, XmlRpcClientProtocol)
        clientprotocol.Url = "http:/开发者_开发知识库/wordpress.com/#quickpress"  'i am not sure if this is the correct url




         Dim id = categories.NewPage("1", "xxxxxx", "xxxxxxx", newBlogPost, 1)

        MsgBox("Posted to Blog successfullly! Post ID : " + id)
        TextBox1.Text = ""
        TextBox2.Text = ""

    End Sub
End Class

When i run this code i get error:Proxy Authentication Required (The ISA Server Requires authorization to fulfill the request Access to web proxy filter is denied)

can anyone please help me resolve thisproblem. Thnaks


I don't really know what the crud I am doing, but I am using similar code like above only in c#. I'm actually trying to figure out how to make the categories work. The one thing I do know is the clientprotocol.url should be in this format:

http://yourblog.wordpress.com/xmlrpc.php

I imagine from the date of your post you probably have figured this out by now.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜