Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/01/2009, 18:38
Avatar de m4xp0wer
m4xp0wer
 
Fecha de Ingreso: septiembre-2007
Mensajes: 66
Antigüedad: 17 años, 9 meses
Puntos: 1
Problema con BinaryWrite + IE

Tengo el siguiente código en ASP para descargar un determinado archivo almacenado en mi servidor:

Código:
          ContentType = "application/x-msdownload"
	  Const adTypeBinary = 1
	  Response.Clear

	  Set objStream = Server.CreateObject("ADODB.Stream")
	  objStream.Open
	  objStream.Type = adTypeBinary
	  objStream.LoadFromFile server.MapPath("../files/"&RS_D("ID_ARCHIVO"))
	  ContentType = "application/octet-stream"
	  Response.AddHeader "Content-Disposition", "attachment; filename=""" & RS_D("NOMBRE") & """"
	  


	  Response.Charset = "UTF-8"
	  Response.ContentType = ContentType
	  Response.BinaryWrite objStream.Read
	  Response.Flush
	  
	  objStream.Close
	  Set objStream = Nothing
El tema es que con Firefox me funciona sin ningún tipo de problema (me abre un diálogo de descarga y punto), pero IE me da el error "Internet Explorer no puede abrir este sitio de Internet. El sitio solicitado no está disponible o no se encuentra. Intente de nuevo más tarde"