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.

Community
  • 1
  • 1
el_konor
  • 528
  • 1
  • 6
  • 15
  • Dude, you added a link which i allready included in question, did you even read it?) this link provides db part of configuring and says nothing about iis which is what i wanna know. And the other one not helping at all. – el_konor Feb 15 '17 at 07:56
  • 2
    The problem is that when IIS virtual directory is mapped to UNC-share, IIS Worker Process tries to sign to directory change notifications for it. But underlying FileTable directory doesn't support this functionality. This prevents IIS from acting further. IIS realizes that it cannot monitor directory mapped to virtual directory and don't even tries to return a file requested from virtual directory, event if it has permissions to do it. I found it by monitoring IIS Worker Process activity with ProcessMonitor tool. – i-one Feb 15 '17 at 08:34

1 Answers1

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>
Mike T.
  • 61
  • 6
  • THANK YOU! I've been trying to figure this out for 2 days! My dev machine has SQL server and IIS on it so this solution worked for me. – merlot Dec 01 '20 at 20:59