Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Streaming of Audio/Video files is allowed through Cassini?
sivakumar.kb
#1 Posted : Friday, April 27, 2007 4:16:25 AM(UTC)
Groups: Member
Joined: 4/27/2007(UTC)
Posts: 4
Location: Bangalore

Hi
In Cassin server is streaming of media content is allowed?
Here the following are the Request and Response headers that i collected from a tracing tool. I think the Cassini server is not streaming the file based on the "range" value in the request header. Please tell me how it can be done?.

Request Header
=================================
GET /1234/lief.wmv HTTP/1.1
HOST: 16.138.32.140:8089
range: bytes=2230132-
CONNECTION: close
transferMode.dlna.org: Streaming


Response Header
==================================
HTTP/1.1 200 OK
Server: UltiDev Cassini/2.1.4.3
Date: Fri, 27 Apr 2007 12:57:06 GMT
X-AspNet-Version: 2.0.50727
Cache-Control: public
ETag: "1C7867F86918200:1C788CB8EEDEA39"
Content-Type: application/octet-stream
Content-Length: 2230428
Connection: Close


Regards
Siva Kumar KB
Ultidev Team
#2 Posted : Friday, April 27, 2007 9:45:07 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi there!

You are right, range header is not supported by UltiDev Cassini out of the box, but if .NET programming is an option, the relatively simple workaround would be creating a custom IHttpModule to handle requests with range header manually.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
sivakumar.kb
#3 Posted : Sunday, May 6, 2007 6:39:31 PM(UTC)
Groups: Member
Joined: 4/27/2007(UTC)
Posts: 4
Location: Bangalore

Hi
thanks for ur reply. Pls can i have the C#.net code for handling range header in cassini? Pls send me the code for handling range header.

Thanks & Regards
siva Kumar KB
Ultidev Team
#4 Posted : Sunday, May 6, 2007 7:49:10 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
We can create a sample if you don't mind waiting for a few days.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
sivakumar.kb
#5 Posted : Tuesday, May 8, 2007 5:37:40 AM(UTC)
Groups: Member
Joined: 4/27/2007(UTC)
Posts: 4
Location: Bangalore

Hi there,
I will be very thankful if you can give as early as possible.
I will be waiting for your code.
Thanks
Siva Kumar KB
Ultidev Team
#6 Posted : Tuesday, May 8, 2007 5:59:45 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
We are working on the sample and will let you know as soon as it's ready.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Ultidev Team
#7 Posted : Tuesday, May 8, 2007 10:14:52 AM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
Hi,

while working on creating a sample of HttpHandler that would handle HTTP range header, we've come across an article with the source code implementing exactly what you need in VB.NET. You can take the HTTPHandler.vb and FileInformation.vb files from the sample to create a stand-alone assembly with the IHttpHandler implementation that you would plug into your Cassini web application using web.config file. You would have to make a modification to the sample code in order to load any file, not just a hard-coded sample ZIP file.

Please let us know if this information is sufficient for you to proceed. If not we'll continue working on our own C# sample, but due to time constraints it will not be as comprehensive in its compliance with standards of HTTP protocol as the sample from the article.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
Ultidev Team
#9 Posted : Thursday, May 10, 2007 5:39:06 PM(UTC)
Ultidev Team

Groups: Administration
Joined: 11/3/2005(UTC)
Posts: 2,253

Thanks: 28 times
Was thanked: 60 time(s) in 59 post(s)
OK, here it is. Sorry it took a while.

We have modified the sample mentioned in our previous post to be a solution to the lack of the "Range" header support in UltiDev Cassini. Here's what we've added:
- Support of any file types, not only .zip;
- Correct "content-type" header value for many known file types;
- Generating "eTag" header value based on file's name, size and last modification date;

To plug this module into your application download the binary of the module, extract PartialContentHandler.dll into your application's Bin folder, and modify your web.config to include following section:
Code:
<system.web>
<httpHandlers>
<add verb="*" path="*.*" type="PartialContentSupportHandler.FileServerHandler, PartialContentHandler"/>
</httpHandlers>
</system.web>

The snippet above will serve all files types, including .ASPX and .CONFIG, as files. So if you need to serve just a few types of files as files and leave others as executable or scripts, use multiple <add> entire with different path attribute values, like
<add path="*.mp3"... />
<add path="*.wma"... />
etc. For more details on how to configure <httpHandlers> section refer to the MSDN article on the subject.

If you do not have an application with ASPX or ASMX scripts, and your application is a pure file server, you can simply unzip the content of the archive with module implementation into the folder registered with Cassini Server as application root and be done with it - it will handle all files and support "range" header.

If you are interested in modifying and adapting the sample to your needs, please feel free to download the project. If you come up with some good additions, please make your improved module available to the community, if possible.

Please let us know if this information has helped.

Best regards,
UltiDev Team.
Please donate at http://www.ultidev.com/products/Donate.aspx to help us improve our products.
sivakumar.kb
#10 Posted : Sunday, May 13, 2007 9:50:25 PM(UTC)
Groups: Member
Joined: 4/27/2007(UTC)
Posts: 4
Location: Bangalore

Hi Team,
Thanks a lot for the solution. the information is very helpful for me. I am working on implementing this and surely i will come back to u if i need any further help of with new suggetions.
thanks & Regards
Siva Kumar KB
Rss Feed  Atom Feed
Users browsing this topic
Guest (3)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.