|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
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 <eduardo.r***@gmail.com> wrote in message
news:1151408269.512978.51830@75g2000cwc.googlegroups.com... The code below seems fine although I'd use the more specific> >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. > 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? >> http://www.clas.com.br/loja/sedex.calculo.aspExample: 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 << 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 Anthony Jones wrote: Show quote > <eduardo.r***@gmail.com> wrote in message > news:1151408269.512978.51830@75g2000cwc.googlegroups.com... > > > >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 > << <eduardo.r***@gmail.com> wrote in message
news:1151416667.423317.114490@y41g2000cwy.googlegroups.com... This error is:->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 ERROR_WINHTTP_CANNOT_CONNECT do you have an outgoing firewall and a proxy server in place? Anthony Jones wrote: Show quote > <eduardo.r***@gmail.com> wrote in message > news:1151408269.512978.51830@75g2000cwc.googlegroups.com... > > > >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 > << 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 Anthony Jones wrote: Show quote > <eduardo.r***@gmail.com> wrote in message > news:1151416667.423317.114490@y41g2000cwy.googlegroups.com... > >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? > > > > Anthony Jones wrote: > > <eduardo.r***@gmail.com> wrote in message > > news:1151408269.512978.51830@75g2000cwc.googlegroups.com... > > > > > >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 > > << |
|||||||||||||||||||||||