Jump to content
Fivewin Brasil

Error MSXML2.XMLHTTP/3 DISP_E_MEMBERNOTFOUND: SEND (resolvido)


ecmsoft

Recommended Posts

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.....

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...