I have an ASP.NET MVC application and which has two virtual directories. The first one (let's name it FirstDir) references some folder on the server (for example C:\SomeDir).
I connect to a MS SQL Server Database. This database has a Filetable named MyFiles. I can explore the directory of table MyFiles in Windows Explorer by path \\sql-server-instance-name\mssqlserver\MyData\MyFiles
. It contains files stored in table MyFiles.
The second virtual directory (SecondDir) in my app references MyFiles tabe's directory (\\sql-server-instance-name\mssqlserver\MyData\MyFiles
) because I would like to use files stored in this table directly from my ASP.NET application.
Then I write the following markup:
<!--Here I retrieve the image from first virtual dir, i.e. from file system-->
<img src="/SiteName/FirstDir/first.png" />
<!--And here I get the image from second virtual dir, i.e. from FileTable-->
<img src="/SiteName/SecondDir/second.png" />
The image in first img
was loaded correctly. But the second image wasn't loaded (error 500.19).
Is it possible to get images from FileTable's directory in browser?
UPDATE:
I can load image from filetable in browser by UNC-path (like this: \\sql-server-instance-name\mssqlserver\MyData\MyFiles\first.png
)
but I can not to use this path as src in img-tag (message in browser's console: 'Not allowed to load local resource' )