kbranch1971
Programmer
Hi. I am having a problem with the load() method of the
XML DOM object. The sample code below simply loads the
request data into a DOM object and echoes the input back
to the requestor. I am getting the error, "No data is
available for the requested resource" when I use a URL for
the schema location. It works fine when I specify the
physical path to the schema (the schema is on the same
server as the asp page) but I need to be able to specify
the URL. Using just the name of the schema, since it is in
the same directory as the ASP script, fails as well. I am
using MSXML4 SP2 on Windows 2003 Server and IIS6. There is
no proxy server. We have monitored the firewall while
running the script and see that the packets from the
download are coming through. The IUSR account has read and
execute scripts permissions. Any ideas as to what may be
causing the problem???
Test script:
<%
ON ERROR RESUME NEXT
response.contentType = "text/xml"
response.clear 'Remove default html the server adds.
'CREATE XML DOM DOCUMENT V4 DOCUMENT.
dim doc
set doc = Server.CreateObject("MSXML2.DOMDocument.4.0"
'VERIFY OBJECT WAS CREATED SUCCESSFULLY.
if isObject(doc) then
'LOAD AND VALIDATE THE DOC FROM THE ASP REQUEST.
doc.async = false
doc.setProperty "ServerHTTPRequest", true
doc.validateonparse = true
doc.load(Request)
if doc.parseError.errorCode <> 0 then
'ERROR OCCURRED - ABORT PROCESSING AND
RETURN DESCRIPTION OF ERROR.
response.write "Error: " &
doc.parseError.reason & "<br>Line: " & doc.parseError.line
else
response.write doc.xml
end if
else
response.write "Error creating XML DOM object"
end if
.
XML DOM object. The sample code below simply loads the
request data into a DOM object and echoes the input back
to the requestor. I am getting the error, "No data is
available for the requested resource" when I use a URL for
the schema location. It works fine when I specify the
physical path to the schema (the schema is on the same
server as the asp page) but I need to be able to specify
the URL. Using just the name of the schema, since it is in
the same directory as the ASP script, fails as well. I am
using MSXML4 SP2 on Windows 2003 Server and IIS6. There is
no proxy server. We have monitored the firewall while
running the script and see that the packets from the
download are coming through. The IUSR account has read and
execute scripts permissions. Any ideas as to what may be
causing the problem???
Test script:
<%
ON ERROR RESUME NEXT
response.contentType = "text/xml"
response.clear 'Remove default html the server adds.
'CREATE XML DOM DOCUMENT V4 DOCUMENT.
dim doc
set doc = Server.CreateObject("MSXML2.DOMDocument.4.0"
'VERIFY OBJECT WAS CREATED SUCCESSFULLY.
if isObject(doc) then
'LOAD AND VALIDATE THE DOC FROM THE ASP REQUEST.
doc.async = false
doc.setProperty "ServerHTTPRequest", true
doc.validateonparse = true
doc.load(Request)
if doc.parseError.errorCode <> 0 then
'ERROR OCCURRED - ABORT PROCESSING AND
RETURN DESCRIPTION OF ERROR.
response.write "Error: " &
doc.parseError.reason & "<br>Line: " & doc.parseError.line
else
response.write doc.xml
end if
else
response.write "Error creating XML DOM object"
end if
.