I am running IIS v6.1 on a virtual hosting server. Changing the default
metabase value is out of the question. Can someone tell me how I can fix
this script? Thank you.
<%
set conn = server.CreateObject("Adodb.connection")
conn.open application("connStr")
manualID = request.querystring("manualID")
if request.Form("manualID") <"" then manualID = request.form("manualID")
set rs = conn.Execute("select manufacturer, t.* from [technical manuals] t,
Manufacturers m where t.mfgID=m.mfgID and t.manualID=" & cint(manualID))
if rs.eof then response.Redirect "techindex.asp"
if not LoggedIn() then response.Redirect "login.asp?manualID=" & manualID
if not IsAccountActive() then response.Redirect
"login.asp?Active=false&manualID=" & manualID
filename = "/" & rs("url")
filename = mid(filename, instrrev(filename, "/")+1)
set fs = server.CreateObject("scripting.fileSystemObject")
sFname = server.mapPath("/manuals.hidden/" & rs("url"))
if not fs.FileExists(sFname) then
url = "/manuals.hidden/" & rs("manufacturer") & "/" & filename
sFname = server.MapPath(url)
end if
'response.ContentType = "application/pdf"
response.AddHeader "Content-Disposition", "attachment; filename=" &
filename
Dim objStream
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Type = 1
objStream.Open
objStream.LoadFromfile(sFname)
Response.binaryWrite objStream.read
objStream.Close
Set objStream = Nothing
Response.Flush
Response.End
' response.redirect url
%>