Visualizzazione dei risultati da 1 a 9 su 9

Discussione: Errore di encoding

  1. #1

    Errore di encoding

    Ciao ragazzi,
    sto urilizzando l'oggetto Serverxmlhttp per una richiesta http, ma quando tento di stampare il contenuto mi restuituisce il seguente errore:
    msxml4.dll error 'c00ce56e'

    System does not support the specified encoding.

    Questo è il codice:
    url = "www.sito.it"
    set objXMLHTTP=CreateObject("MSXML2.ServerXMLHTTP.4.0" )
    objXMLHTTP.Open "POST", URL, false
    objXMLHTTP.send strForm

    response.write("Response: " & objXMLHTTP.responseText & "
    " & vbCrLf)
    set objXMLHTTP = nothing

    Avete idea di come posso risolvere?

  2. #2
    url = "http://www.sito.it"

    Sicuro di aver messo l'http ???

    Hai errore sul .send ???

  3. #3
    Si, ho messo l'http, l'errore è nella riga del .responsetext

  4. #4
    Prova a usare responseBody al posto di responseText

    Se ho azzeccato il comando funziona

  5. #5
    Se vuoi fare una chiamata post devi anche stabilire il content type appropriato.
    Inoltre prima di richiamare il metodo response* dovresti fare un po' di error handling.
    dai un'occhiata qui:

    http://www.aspitalia.com/script/271/...T-XMLHTTP.aspx

    xxx

  6. #6
    Non ci crederete, ma ancora non riesco a risolvere,
    vi riposto il codice:

    strPost = "http://www.miosito.it"
    Set callHttp = server.CreateObject("MSXML2.ServerXMLHTTP.4.0")
    callHttp.open "GET", strPost, false
    callHttp.send()
    file1 = callHttp.responsetext

    @darioN1: hoprovato con responseboby, non mi da errore, ma non mi restituisce nulla :-(

    HELP!!

    @Alethesnake: lo status è 200!

  7. #7
    Ultimo up :-(

  8. #8
    ok che ti da errore, ma che errore ti da??
    e poi, ti connetti ad internet o ad una intranet?
    ti connetti direttamente ad internet o tramite proxy?

    io ho provato questo in locale e funziona bene (ho qualche problema con i siti esterni per colpa del proxy):

    codice:
    <%
    Dim xmlhttp, url, status, strGet
    
    strGet  = ""
    'url     = "http://www.google.it"
    url    = "http://127.0.0.1/prove/default.asp"
    
    Set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP.4.0")
    xmlhttp.open "GET", url, false
    
    xmlhttp.send (strGet)
    
    status = CInt(XMLHTTP.status)
    
    if status = 200 then
        Response.write (xmlhttp.responseText)
    else
        Response.Write ("Si è verificato un errore:
    ")
        Response.Write (status & ": " & xmlhttp.statusText)
    End if
    
    Set xmlhttp = Nothing
    %>


    edit:
    già che ci sei, dai un'occhiata qua e prova a postare il link della pagina che vuoi interrogare così se riesco provo da casa.
    http://support.microsoft.com/default...;EN-US;q304625
    xxx

  9. #9
    Ciao Alethesnake,
    prova ad esempio con questo
    Codice PHP:
    <%

    url "http://www.tuttogratis.it/"


    strGet  ""

    Set xmlhttp Server.CreateObject("MSXML2.ServerXMLHTTP.4.0")
    xmlhttp.open "GET"urlfalse

    xmlhttp
    .send (strGet)

    status CInt(XMLHTTP.status)

    if 
    status 200 then
        Response
    .write (xmlhttp.responseText)
    else
        
    Response.Write ("Si è verificato un errore:
    "
    )
        
    Response.Write (status ": " xmlhttp.statusText)
    End if

    Set xmlhttp Nothing
    %> 
    IO becco:
    msxml4.dll error 'c00ce56e'

    System does not support the specified encoding.
    Line 18, ovvero Response.write (xmlhttp.responseText)

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.