Click here to Skip to main content
Rate this: bad
good
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 at 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 at 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 at 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 at 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 at 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
0 Sergey Alexandrovich Kryukov 383
1 OriginalGriff 304
2 George Jonsson 258
3 Animesh Datta 130
4 Shemeemsha RA 128
0 OriginalGriff 6,099
1 Sergey Alexandrovich Kryukov 5,411
2 CPallini 4,770
3 George Jonsson 3,400
4 Gihan Liyanage 2,522


Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 20 Aug 2014
Copyright © CodeProject, 1999-2014
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