title: Download files using classic asp
body: <p>I followed the below link but I am not able to download the file :</p>
  
  <p><a href="https://stackoverflow.com/questions/12929866/how-to-download-the-files-using-vbscript-in-classic-asp">StackOverflow Question on same Topic from where I used the code</a></p>
  
  <p>Here is my download.asp code :</p>
  
  <pre><code>&lt;%
    Dim objConn, strFile
    Dim intCampaignRecipientID
  
    strFile = Request.QueryString("file")
  
    If strFile &lt;&gt; "" Then
  
  Response.Buffer = False
  Dim objStream
  Set objStream = Server.CreateObject("ADODB.Stream")
  objStream.Type = 1 'adTypeBinary
  objStream.Open
  'FilePath=server.MapPath("some_folder/DOWNLOAD/")
  'Response.Write(Server.MapPath("some_folder/download/") &amp; "\" &amp; strFile)
  objStream.LoadFromFile(Server.MapPath("some_folder/download/") &amp; "\" &amp; 
  strFile)
  Response.ContentType = "application/x-unknown"
  Response.Addheader "Content-Disposition", "attachment; filename=" &amp; strFile
  Response.BinaryWrite objStream.Read
  objStream.Close
  Set objStream = Nothing
  
   End If
   %&gt;
  </code></pre>
  
  <p>I am getting Error Invalid Response...The page is not accessible error.</p>
  
  <p>The download folder is at the same level as wwwroot folder so the folder structure is :</p>
  
  <p>wwwroot              some_folder/download</p>
  
  <p>I have my download folder in wwwroot/download.asp that is why I am using server.mappath. I even tried ../some_folder/download but same error.</p>
  
  <p>Can someone help me in solving this issue.</p>
  
  <p>Thanks in Advance. </p>