ecmsoft Posted June 11, 2013 Report Share Posted June 11, 2013 Estou usando o comando a baixo para abrir uma conexão http. Quando conecto pela primeira vez dá tudo certo, porém, na segunda vez, dá o erro: Error MSXML2.XMLHTTP/3 DISP_E_MEMBERNOTFOUND: SEND. Quando abro novamente o sistema, funciona, mas na segunda vez o erro se repete, como se ficasse algum "lixo" na memória que impedisse uma segunda conexão. Alguém já passou por isso ? try http := GETACTIVEOBJECT( 'MSXML2.XMLHTTP' ) catch try http := CREATEOBJECT( 'MSXML2.XMLHTTP' ) catch ? "Erro: Criação do objeto OLE : " + Ole2TxtError() Return(.f.) end end http:Open( "GET", "http://homologacao.anvisa.gov.br/sngpc/", .F. ) http:SetRequestHeader( "Accept", "*/*" ) http:SetRequestHeader( "Accept-Language", "pt-br" ) http:SetRequestHeader( "Accept-Encoding", "gzip, deflate" ) http:SetRequestHeader( "User-Agent" , "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; BTRS25991; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; AskTB5.6)" ) http:SetRequestHeader( "Host" , "homologacao.anvisa.gov.br" ) http:SetRequestHeader( "Connection" , "Keep-Alive" ) http:send() response := http:statusText .....etc,etc,etc..... Quote Link to comment Share on other sites More sharing options...
kapiaba Posted June 11, 2013 Report Share Posted June 11, 2013 http://forums.fivetechsupport.com/viewtopic.php?f=3&t=25640 http://www.pctoledo.com.br/forum/viewtopic.php?f=4&t=10408&start=15 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.