English 中文(简体)
管理系统XML “该系统无法找到特定资源”
原标题:MSXML "The system cannot locate the resource specified"
  • 时间:2010-10-28 09:54:53
  •  标签:
  • vb.net
  • msxml

我的职能是利用MSXML张贴一份XML文件,该文件尽管没有改动,但昨天开始失败。 该职能如下:

Public Function PostFile(ByVal address As String, ByVal data As Byte()) As xmldocument
    Dim xmlHTTP As New MSXML2.XMLHTTP
    Dim response As New XmlDocument

    Dim xmlDoc As New MSXML2.DOMDocument

    Try
        xmlDoc.load(data)
        xmlHTTP.open("post", address, False)
        xmlHTTP.send(xmlDoc)

        If xmlHTTP.responseXML.xml <> String.Empty Then
            response.LoadXml(xmlHTTP.responseXML.xml)
            Return response
        Else
            Dim result As String = "<NO_Response><Error>the post succeeded to " + address + " but there was no responce returned</Error><Hint>Check FireWall Settings</Hint></NO_Response>"
            response.loadxml(result)
            Return response
        End If

    Catch ex As Exception
         Error logging code removed

    End Try
    Return Nothing
End Function

XML文件以及正在通过的地址是正确的,造成错误的行文是xmlHTTP.send(xmlDoc)。 我在两台不同的机器上尝试了这台机器,每台都有同样的错误,并且还尝试转录MSXML3,但没有成功。

提出的例外是:

InnerException: Nothing 
Message:        "The system cannot locate the resource specified. "
Source:         "msxml3.dll"    
StackTrace:     "   at MSXML2.XMLHTTPClass.send(Object varBody)    at comms.HTTPHandler.PostFile(String address, Byte[] data) in D:SCCMainSenderHttp.vb:line 42"
最佳回答

事实证明这是一个网络问题,首先,我怀疑这一问题,因为错误的提出速度如此快,没有提出最终点的问题。 问题在于在防火墙上添加了一条规则,防止与目的地的通信。

问题回答

If you are just processing the xml or dtd is offline, you can use: xmlDoc.resolveExternals = False





相关问题
Is Shared ReadOnly lazyloaded?

I was wondering when I write Shared ReadOnly Variable As DataType = New DataType() Or alternatively Shared ReadOnly Variable As New DataType() Is it lazy loaded or as the instance initializes? ...

Entertaining a baby with VB.NET

I would like to write a little application in VB.NET that will detect a baby s cry. How would I get started with such an application?

Choose Enter Rather than Pressing Ok button

I have many fields in the page and the last field is a dropdown with list of values. When I select an item in a dropdown and press Enter, it doesn t do the "Ok". Instead I have to manually click on Ok ...

ALT Key Shortcuts Hidden

I am using VS2008 and creating forms. By default, the underscore of the character in a textbox when using an ampersand is not shown when I run the application. ex. "&Goto Here" is not ...

Set Select command in code

On button Click I want to Set the Select command of a Gridview. I do this and then databind the grid but it doesn t work. What am i doing wrong? protected void bttnView_Click(object sender, ...

Hover tooltip on specific words in rich text box?

I m trying to create something like a tooltip suddenly hoovering over the mouse pointer when specific words in the richt text box is hovered over. How can this be done?

热门标签