views:

517

answers:

1

Hello!

I have store in SQL Server 2005 audio and video files. I want to play this files in ASP.NET without storing them on filesystem.

With images stored in SQL Server 2005 I use a custom HTTP Handler, but I don't know if I can do the same with video and audio files.

Which is the best way of doing it? Silverlight?

Maybe I need a physical file to play it with silverlight.

Thank you!

+1  A: 

For the control you are using you will need to set the source to being a dymanic page that writes out the content with the correct content-type.

So you:

Create the 'viewing' page and place in it your video playing object. Set the source to be some new aspx page. in the new aspx page, set the content type appropriate for the file stream out the bytes from the database.

Luke Schafer
Is there an example somewhere of what the code should more-or-less look like?
mcjabberz