Good day! I have an asp.net mvc web application. It uses the sql server database, in which there is a file table (Filetable), which stores some images and videos that I display on the site pages. I am trying to get to the contents of this table through a virtual directory, as I advised @ i-one in the comments to this question . Suppose the contents of the file table is stored in this path:
\\sql-server-name\mssqlserver\MyFiles I create a virtual directory of images in IIS for my site that refers to this path. Next, I write about the following:
<img src='/images/mypicture.png' /> Unfortunately, the browser can not display this image and gives 404 error. I thought that IIS did not want or could not display the contents of the folder from the depths of the sql-server and therefore, for the sake of experiment, I created another virtual directory called newImages for this site, but it already refers to the img folder in the root of the site. I am writing this html-tag
<img src='/newImages/mypicture.png' /> This again does not work and produces 404. But if you write without using a virtual directory, like this:
<img src='/img/mypicture.png' /> then it works. Actually the question is: how to make the browser (or IIS) correctly find and display the images in the virtual directory?
PS tried different options to set the path in src. Both images/mypicture.png and images/mypicture.png and ~/images/mypicture.png didn't work