Ciao.
Con gli esempi trovati con la ricerca sto provando tramite ASP a forzare il download di un file formato PDF:
codice:
path_temp = "C:\Documents and Settings\Administrator\My Documents\22-10-2008.pdf"
strNome = "22-10-2008.pdf"
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Type = 1
objStream.Open
objStream.LoadFromFile path_temp
Response.AddHeader "Content-Disposition", "attachment; filename=" & strNome
Response.ContentType = "application/octet-stream"
Response.BinaryWrite objStream.Read
Response.Flush
objStream.Close
Set objStream = Nothing
Il file esiste sul server ma il codice ASP risponde con:
ADODB.Stream error '800a0bba'
File could not be opened.
/dettaglio.asp, line 216
Come mai? Che sbaglio?