【问题标题】:When I run code to post blog i get error: Proxy Authentication required当我运行代码发布博客时出现错误:需要代理身份验证
【发布时间】:2011-06-01 21:10:19
【问题描述】:

我正在用 vb 编写代码将博客发布到 wordpress。

这里是代码

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

当我运行此代码时,我收到错误:需要代理身份验证(ISA 服务器需要授权才能完成请求访问 Web 代理过滤器被拒绝)

谁能帮我解决这个问题。 谢谢

【问题讨论】:

    标签: wordpress authentication proxy


    【解决方案1】:

    我真的不知道我在做什么,但我只在 c# 中使用与上面类似的代码。我实际上是想弄清楚如何使类别起作用。我知道的一件事是 clientprotocol.url 应该是这种格式:

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

    我想从您发帖的日期开始,您现在可能已经想通了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-02
      • 1970-01-01
      相关资源
      最近更新 更多