Click here to Skip to main content
15,880,905 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey guys!

Now I've got a question for you. I'm running a ASP.NET REST Web API using OWIN running as a windows service. Now I've got SQL Server running on a different host, containing a table with binary data and FILESTREAM enabled.

I want to pass this binary data from the web API to the caller. How do I get owin to access SQL Server with credentials that can access the FILESTREAM?

Appreciate your help!
Posted
Comments
PhilLenoir 20-Aug-14 11:59am    
I've not used Filestream, I still store my binary data in a varbinary(max) field as my understanding is that you don't really his any benefits until you have really large files. However, my understanding was that you merely need database permissions and the SQL Agent actually writes the data out into the file system, so it's the SQL process that needs file permissions. Furthermore, you just queried the data like any other column. I hope this helps.
Eduard Keilholz 21-Aug-14 3:08am    
Thanks, but no... It didn't help at all. I know how varbinary(max) works and I understand SQL Server and NTFS permissions, but accessing binary data through filestream works a little bit different. I think you have to have FILESTREAM experience in order to answer this question.
PhilLenoir 21-Aug-14 9:12am    
Eduard, that's why it's not a solution! :) I looked at Filestream recently but decided against using it and sticking to the tried and tested binary types. Good luck!
Eduard Keilholz 22-Aug-14 4:40am    
I don't agree, we're talking about a high res image database with image files larger than 20 Mb, so there's a huge advantage using filestream http://www.sqlskills.com/blogs/paul/sql-server-2008-filestream-performance/
PhilLenoir 22-Aug-14 10:06am    
... and my solution required typically 3 - 6 MB files and sometimes less. It's not a question of agreeing, it's a question of different contexts!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900