0
我是asp新手,但需要爲朋友修復軟件。問題是使用MSXML2.ServerXMLHTTP讀取.asp頁面以生成憑證的例程。我已經知道它可以工作並顯示來自任何服務器的頁面,但是當我嘗試從我自己的Windows服務器打開一個頁面時,例程會返回空白,或掛起服務器。已經嘗試了一切。不知道它是否可能與權限有關?asp服務器XML HTTP對象什麼都不返回
它似乎卡在readyState = 1。
<%
Response.Buffer = True
Dim objXMLHTTP, xml
Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
' Opens the connection to the remote server.
xml.Open "GET", "http://someurl/Testpage.asp", False
' Actually Sends the request and returns the data:
xml.Send
'Display the HTML both as HTML and as text
Response.Write "<h1>The HTML text</h1><xmp>"
Response.Write xml.responseText
Response.Write "</xmp><p><hr><p><h1>The HTML Output</h1>"
Response.Write xml.responseText
Set xml = Nothing
%>
嗨,它得到顯示一個.txt文件,但不是一個簡單的.asp文件。權限? – Michael99
也適用於.htm文件,只有.asp文件不工作? – Michael99
請使用問題下方的編輯鏈接爲問題添加更多詳細信息,而不是使用評論。你也許需要提供你的.asp頁面的更多細節。它是否包含任何JavaScript或其他客戶端代碼?當你像這樣獲取頁面時,這些不會執行。 – Dijkgraaf