ServerHTTPRequest

E

eduardo.rosa

Hi people, I need some help with ServerHTTPRequest.

My question is: why can I load only the last rss? Somebody have any
idea?

Thanks a lot.


Example:
http://www.clas.com.br/loja/sedex.calculo.asp

Code:
Sub getXML(sourceFile)
dim styleFile
dim source, style
styleFile = Server.MapPath("news.xsl")

set source = Server.CreateObject("MSXML2.DomDocument")
source.async = false
source.setProperty "ServerHTTPRequest", true
source.load CStr( sourceFile )

'Se não for possível a conexão, mosta código de erro
Response.Write( "<br/> Código de Erro: " & source.parseerror )
Response.Write( "<br/> Código de Erro: " &
source.parseerror.reason )

set style = Server.CreateObject("Msxml2.DomDocument")
style.async = false
style.load styleFile

'source.transformNodeToObject style, Response
set source = nothing
set style = nothing
End Sub
 
A

Anthony Jones

Hi people, I need some help with ServerHTTPRequest.

My question is: why can I load only the last rss? Somebody have any
idea?

Thanks a lot.

The code below seems fine although I'd use the more specific
MSXML2.DOMDocument.3.0
Prog ID. I'm afraid I find your question a very cryptic. In the link below
the first item results in a empty html file, the second is a raw xml, the
third is transformed to html and the forth returns raw xml.

Can you explain more clearly what your problem is?
Example:
http://www.clas.com.br/loja/sedex.calculo.asp

Code:
Sub getXML(sourceFile)
dim styleFile
dim source, style
styleFile = Server.MapPath("news.xsl")

set source = Server.CreateObject("MSXML2.DomDocument")
source.async = false
source.setProperty "ServerHTTPRequest", true
source.load CStr( sourceFile )

'Se não for possível a conexão, mosta código de erro
Response.Write( "<br/> Código de Erro: " & source.parseerror )
Response.Write( "<br/> Código de Erro: " &
source.parseerror.reason )

set style = Server.CreateObject("Msxml2.DomDocument")
style.async = false
style.load styleFile

'source.transformNodeToObject style, Response
set source = nothing
set style = nothing
End Sub
<<
 
A

Anthony Jones

Of course.

In the example ( http://www.clas.com.br/loja/sedex.calculo.asp ) I try
to load 4 feeds.
All the feeds, if access by browser are ok. But feeds 1, 2 and 3
loading using the code generate a -2147012867 error.

Only last feed works loaded by code, that's I don't undestand.

thanks a lot

This error is:-

ERROR_WINHTTP_CANNOT_CONNECT

do you have an outgoing firewall and a proxy server in place?
 
E

eduardo.rosa

Well, I don't have the server then I need ask to config for me.

The server people sad they create a rule in firewall to the file
"sedex.calculo.asp".
I really don't know other permissions that the script need.

thanks a lot
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top