P
P
Pupkin_Vasia2017-02-10 13:52:12
IIS
Pupkin_Vasia, 2017-02-10 13:52:12

How to access FileTable folder for IIS?

Hello! There is such a problem. I have an asp.net mvc application and a sql server 2014 database. The database has a table of type FileTable. I can access the files stored in the table from Windows Explorer along the following path:
\\sql-server-name\mssqlserver\MyData\MyFiles
I would like to access these files from the application (for example, put file links in the `src` attributes `img`, `video` and `audio` elements). To do this, I created a virtual directory (let's call it OuterFiles) in my web application in IIS. Directory refers to the directory where the contents of the FileTable are stored. After that I tried to use this virtual directory in my application. Something like this: But the image doesn't load, instead I get an HTTP 500.19 Configuration Error:
<img src='/OuterFiles/picture.png' />
Failed to read configuration file due to lack of required permissions
Configuration file: \\?\UNC\sql-server-name\mssqlserver\MyData\MyFiles\web.config
For the sake of experiment, I created another virtual directory (let's call it AnotherOuterFiles) referring to a regular folder (for example C:\SomeFolder ) also containing images and wrote the following markup: and it worked. Apparently, Windows (or sql server) doesn't give IIS permission to access the folder that contains the contents of the FileTable and because of that I get the 500.19 error. Now the question is: is it possible to somehow give this access, and if so, how? Thanks in advance PS
<img src='/AnotherOuterFiles/picture2.png' />
1. I tried to access the properties of this folder to give access to it to certain users, but in the folder properties there is simply no Security tab where you can assign it
2. I went to the SQL server configuration manager and set the Allow remote clients access to FILESTREAM data flag there , unfortunately it did not help
3. I created an alias for this folder using the mklink command line command, and already set a virtual directory on this alias, but the problem remained

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Skorzhinsky, 2017-02-10
@AndyKorg

There are a few notes in the " FileTable Security " section of MSDN that might help you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question