<%
FileName = Request.QueryString("percorso")&"/"&Request.QueryString("file")&"."&Request.QueryString("estensione")
FullFileName = Server.MapPath(FileName)
'Response.Write FullFileName
'Response.End
Response.Clear
Response.Buffer = True
Response.ContentType = "application/x-unknown"
Response.Addheader "Content-Disposition", "attachment; filename=" & chr(34) & Request.QueryString("file")&"."&Request.QueryString("estensione") & chr(34)
Response.Binarywrite GetBinaryFile(FullFileName)
Response.Flush
Response.Close
Function GetBinaryFile(ByVal FileSpec)
Const adTypeBinary = 1
Dim objStream
Set objStream = Server.Createobject("ADODB.Stream")
objStream.Open()
objStream.Type = adTypeBinary
objStream.LoadFromFile FileSpec
GetBinaryFile = objStream.Read()
Set objStream = Nothing
End Function
%>