<%@ LANGUAGE="VBScript" %> <% Function getBinaryFile(strFilePath) Dim oStream Set oStream = Server.CreateObject("ADODB.Stream") oStream.Open oStream.Type = adTypeBinary oStream.LoadFromFile strFilePath getBinaryFile = oStream.read Set oStream = Nothing End Function Dim MyFile Dim MyPath Dim MyServer Dim Local MyPath = "/download/" MyFile = "The_Architects_Act_1972.pdf" Response.AddHeader "content-disposition","inline; attachment; filename=" & chr(34) & Myfile & chr(34) Response.ContentType = "application/octet-stream" Response.BinaryWrite getBinaryFile(Server.MapPath(MyPath & MyFile)) %>