-
Load problem
Hello everyone,
I am using set xmlHTTP = server.CreateObject("MSXML2.ServerXMLHTTP") to send
and receive XML doc over HTTP. (Proxy config utility has been installed on
the prod machine).
When I receive an XML file in response from another server. And when I try
to load that file in XMLDOM using the following in turns.
Set xmlDOM = Server.CreateObject("Microsoft.xmlDOM")
Set xmlDOM = Server.CreateObject("MSXML2.DOMDocument")
but still doesnot work.
I get the following error:
Error No. -> -2146697208
Error Desc -> The download of the specified resource has failed. Error processing
resource 'http://asdf.asdf.com:80/asdf/asdf.dtd'.
The thing is the same code works on my dev machine (NT) and it doesnt work
on prod server (win2k). Is it maybe due to proxy server settings?
Anybody any idea? Any help would be highly appreciated.
-
Re: Load problem
Sounds more like a permissions error. You (running on your dev machine) can
access the resource, but the anonymous IIS account cannot.
Here's a three-step check
1. insert a Response.write(Server.HTMLEncode(xmlHTTP.ResponseText)) command
just after requesting the file on the server. If you get back the correct
data, then it's not a permissions error.
2. If you're not getting back valid data, you could--depending on your
access to the //asdf.asdf.com server--set up auditing on the target file.
That way you can read the audit log to see (a) whether the request is
reaching the server; and (b) what errors are occurring.
Russell Jones
Sr. Web Development Editor,
DevX.com
"David E" <registerukh@hotmail.com> wrote in message
news:3b12686a$1@news.devx.com...
>
> Hello everyone,
>
> I am using set xmlHTTP = server.CreateObject("MSXML2.ServerXMLHTTP") to
send
> and receive XML doc over HTTP. (Proxy config utility has been installed on
> the prod machine).
>
> When I receive an XML file in response from another server. And when I try
> to load that file in XMLDOM using the following in turns.
>
> Set xmlDOM = Server.CreateObject("Microsoft.xmlDOM")
> Set xmlDOM = Server.CreateObject("MSXML2.DOMDocument")
>
> but still doesnot work.
>
> I get the following error:
> Error No. -> -2146697208
> Error Desc -> The download of the specified resource has failed. Error
processing
> resource 'http://asdf.asdf.com:80/asdf/asdf.dtd'.
>
> The thing is the same code works on my dev machine (NT) and it doesnt work
> on prod server (win2k). Is it maybe due to proxy server settings?
>
> Anybody any idea? Any help would be highly appreciated.
>
-
Re: Load problem
Hi Russell,
Thank you very much for your response.
I had already tried what you said in your mail. Let me please tell you what
exactly is happening in my project.
1) From serverA, I send an XML file to ServerB (belongs to another company)
and receive back another XML file (from ServerB to ServerA) and ServerA reads
the XML file and sends out an email to the user. This XML transaction is
happening over HTTP.
2) ServerA is behind firewall and uses proxy server (SQUID). To bypass the
proxy I have installed the proxy config utility on prod machine(as recommended
by Microsoft).
3) I am able to send XML file from ServerA as ServerB guys have confirmed
the receipt of that file.
4) ServerB is even sending another XML and actually ServerA(read me) receives
the file. How can I say is that is, I have stored the received XML file on
hard disk (on serverA) and as well as I sent the content to myself by email
(just the raw file).
5) But, when I try to load the received XML file in XMLDOM, I get the error
message which I posted in my first message. I know the DTD is working and
is good.
6) When I did this transaction from my dev machine (NT) and my machine is
not behind any firewall, the transaction went fine. I dont even have the
proxy config utility installed on my dev machine. And I am able to read the
received XML file and display the results on the screen and send an email.
Any ideas? Just that DTD is not accessible (from serverA sorta). Do you think,
I still have permissions problem?
I will really appreciate any help from you.
Thanks.
The code segment as follows:-
<CODE>
set xmlHTTP = server.CreateObject("MSXML2.ServerXMLHTTP")
xmlHTTP.open "POST", "http://asdf:80/asdf/", false
xmlHTTP.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
'xmlCode has the actual XML file contents
xmlHTTP.send(xmlCode)
'The following saving is done just to debug the problem
strXMLResponse = xmlHTTP.ResponseXML.XML
'Save the receive XML file to hard disk
set fsoXML = server.CreateObject("Scripting.FileSystemObject")
set fXML = fsoXML.CreateTextFile(server.MapPath("XMLDocs") & "\" & WrSeq
& ".xml")
fXML.Write strXMLResponse
fXML.Close
set fXML = nothing
set fsoXML = nothing
Set xmlDOM = Server.CreateObject("MSXML2.DOMDocument")
xmlDOM.async = false
xmlDOM.setProperty "ServerHTTPRequest", true
Root = xmlDOM.load(server.MapPath("XMLDocs") & "\" & WrSeq & ".xml")
dim oXMLError
If Root = False Then
Set oXMLError = xmlDOM.ParseError
Response.Write "<BR>   " & oXMLError.ErrorCode & " - "
& oXMLError.Reason & " URL=" & oXMLError.URL & "<br>"
Set oXMLError = Nothing
End If
</CODE>
"Russell Jones" <arj1@northstate.net> wrote:
>Sounds more like a permissions error. You (running on your dev machine)
can
>access the resource, but the anonymous IIS account cannot.
>
>Here's a three-step check
>1. insert a Response.write(Server.HTMLEncode(xmlHTTP.ResponseText)) command
>just after requesting the file on the server. If you get back the correct
>data, then it's not a permissions error.
>
>2. If you're not getting back valid data, you could--depending on your
>access to the //asdf.asdf.com server--set up auditing on the target file.
>That way you can read the audit log to see (a) whether the request is
>reaching the server; and (b) what errors are occurring.
>
>Russell Jones
>Sr. Web Development Editor,
>DevX.com
>
>"David E" <registerukh@hotmail.com> wrote in message
>news:3b12686a$1@news.devx.com...
>>
>> Hello everyone,
>>
>> I am using set xmlHTTP = server.CreateObject("MSXML2.ServerXMLHTTP") to
>send
>> and receive XML doc over HTTP. (Proxy config utility has been installed
on
>> the prod machine).
>>
>> When I receive an XML file in response from another server. And when I
try
>> to load that file in XMLDOM using the following in turns.
>>
>> Set xmlDOM = Server.CreateObject("Microsoft.xmlDOM")
>> Set xmlDOM = Server.CreateObject("MSXML2.DOMDocument")
>>
>> but still doesnot work.
>>
>> I get the following error:
>> Error No. -> -2146697208
>> Error Desc -> The download of the specified resource has failed. Error
>processing
>> resource 'http://asdf.asdf.com:80/asdf/asdf.dtd'.
>>
>> The thing is the same code works on my dev machine (NT) and it doesnt
work
>> on prod server (win2k). Is it maybe due to proxy server settings?
>>
>> Anybody any idea? Any help would be highly appreciated.
>>
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks