David Stone asked a question - I threw this page together to show him a method.

It aint tidy but it works and will give him some clues. I hope that it helps David.

This first page gets a password to prove it is OK to download


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Get EM</title>
</head>
<body>
<form method="post" action="do_dlEM.asp">
<input type="password" name="p">
<input type="submit" value="OK" />
</form>
</body>
</html>


Then this does the download



<%@Language="VBScript"%>
<%Option Explicit%>
<%Response.Buffer = True%>
<%

if Request.Form("p") <> "123itisme" then
	Response.Write now
	Response.End
end if

On Error Resume Next
'Dim strPath
'strPath = CStr(Request.QueryString("file"))
'-- do some basic error checking for the QueryString
  Call DownloadFile("nosuch.exe")

Private Sub DownloadFile(file)
  '--declare variables
  Dim strAbsFile
  Dim strFileExtension
  Dim objFSO
  Dim objFile
  Dim objStream
  '-- set absolute file location
  strAbsFile = "C:\inetpub\wwwroot\myfolder\myfile.dbf"
  '-- create FSO object to check if file exists and get properties
  Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
  '-- check to see if the file exists
  If objFSO.FileExists(strAbsFile) Then
    Set objFile = objFSO.GetFile(strAbsFile)
      '-- first clear the response, and then set the appropriate headers
      Response.Clear
      '-- the filename you give it will be the one that is shown
      '   to the users by default when they save
      Response.AddHeader "Content-Disposition", "attachment; filename=" & objFile.Name
      Response.AddHeader "Content-Length", objFile.Size
      Response.ContentType = "application/octet-stream"
      Set objStream = Server.CreateObject("ADODB.Stream")
        objStream.Open
        '-- set as binary
        objStream.Type = 1
        Response.CharSet = "UTF-8"
        '-- load into the stream the file
        objStream.LoadFromFile(strAbsFile)
        '-- send the stream in the response
        Response.BinaryWrite(objStream.Read)
        objStream.Close
      Set objStream = Nothing
    Set objFile = Nothing
  Else  'objFSO.FileExists(strAbsFile)
    Response.Clear
    Response.Write("No such file exists.")
  End If
  Set objFSO = Nothing
End Sub
%>