Access to SQL Server FileTable from IIS

╄→尐↘猪︶ㄣ 提交于 2021-01-28 09:02:51

问题


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.


回答1:


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>


来源:https://stackoverflow.com/questions/42153837/access-to-sql-server-filetable-from-iis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!