Click here to Skip to main content
12,406,124 members (39,427 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: SQL FileStream OWIN
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 20-Aug-14 5:15am
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160726.1 | Last Updated 20 Aug 2014
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100