Access to SQL Server FileTable from IIS

1

After creating filetable I've got a shared folder \\<my domain>\mssqlserver\<filestream directory>\<my table> I've made all nesessary settings in SqlServer Configuration manager to make it available and added couple of files with database stored proc.

I made virtual folder for my web site http://localhost/<my ewb site>/<virtual folder>/ referencing shared table folder.

When I try to get file from folder I get en error: HTTP 500.19 - Internal Server Error Code 0x80070032

I found something in answer of this question Access Denied when inserting file into Sql Server 2012 FileTable using File.CreateFile in ASP.NET website

But it's only a database part of configuring. I don't understand how to configure IIS and virtual folder to grant access to shared folder.

sql-server
iis
iis-6
filetable
asked on Stack Overflow Feb 10, 2017 by el_konor • edited May 23, 2017 by Community

1 Answer

3

Not sure if this is relevant to your situation, but I came across the same problem. 2 out of 3 sites that I setup worked fine with the UNC path virtual directory pointing to the SQL filetable share, but the 3rd site got the error above. The reason was because this site was had both IIS and SQL on the same server, and using the server name in the UNC path was causing a reparse and checking for directory change notifications, which mentioned in the comments above aren't supported by SQL. So I changed the UNC path to use localhost instead of the server name and it worked! So, instead of:

\\<my domain>\mssqlserver\<filestream directory>\<my table>

use:

\\localhost\mssqlserver\<filestream directory>\<my table>
answered on Stack Overflow Jan 11, 2018 by Mike T.

User contributions licensed under CC BY-SA 3.0