I need to show images on my ASP. Due to the security reasons, I cannot simply put all of my images in the images folder in my website folder and I need to put them outside of my website folder.
For example, my website folder is located at: C:\Inetpub\wwwroot\mysite\
But I need to put images (which I want to show on my web pages) at: C:\images\
I am trying to use ADODB.stream object to pull the images from C:\Images folder and display the image on my ASP using ASP vb codes as shown below
Name of this ASP: ReadImage.asp
Response.ContentType = "image/png"
Set adoStream = Server.CreateObject("ADODB.Stream")
adoStream.Type = 1
FPath = "C:\images\1.png"
Set adoStream = Nothing
When I launch this webpage in internet explorer, the page shows a File Download window/message for downloading the image file "1.png" rather than displaying the image on the web page.
I also tried creating another ASP named "DisplayImage.asp" and used the following code to display the image on this page but,
when I launch this page, the page cannot display the image either.
Please explain how to change this code to make it work.