play the range of big WMV files by using ASP.NET - asp.net

I am developing a ASP.NET by using c#.net and have many WMV files and have to watch the range of the file which I gave.The size of files are too big also the users shouldn't download the all of the file , should download between the range which I give . Is there anybody to help me ?

Unfortunately since WMV files have a header at the beginning and an index at the end you can't just use a FileStream to deliver partial files, for that "streaming" formats like MPEG1/2 or H.264 are much better.
For partial WMV file streaming I would investigate in
Microsoft Media Services
This will basically do the job for you, although if you want tight control over the offsets you want to stream from you will have to dynamically create playlists for your files (i.e. see Server side playlists)

Related

generate xml manifest from media specifically audio

I am trying to implement DRM and EME in my my dashjs music streaming app but then I realized that to use dashjs I need to have a manifest xml file to handle segmentation ..etc so does any one know how to generate manifest automatically or even better generate it on the cliemt side when uploading audio
i solved it using shaka packager to encrypt and create the xml manifest for me automatically

asp.net Web API retrieve file(s) without saving them

I want to retrieve file(s) with ASP.NET Web Api, XML file(s) or zip file(s).
There are many examples how to do this, like this:
http://www.asp.net/web-api/overview/working-with-http/sending-html-form-data,-part-2
But the problem is, I don't want to save them on HDD!
I just want to validate the XML with some functions and generate a report on the fly and want to return this report.
But every tutorial use the "MultipartFormDataStreamProvider" witch save the files on HDD.
How can I get the file(s) and file name(s) in memory?
Kind regards
I think you can use the MultipartMemoryStreamProvider?
See a way to implement file upload without writing to the file system.

Flex SDK 3.5 - Check file mimetype

Is there a way to get a file's mimetype in Flex SDK 3.5 without using its extension?
I need to validate if an uploaded file is of a certain kind. This is for images, or documents (PDF, ODT, etc.)
All the solutions I've found are by checking its extension. What if I rename a .odt file as a .jpg? Then I can upload it as an image...
I should add, we are using an AIR desktop client and a Java EE server. File checking is solved on the Java side, but the idea is not to go to the server, validate the file so if it's not valid, there's no network traffic at all.
Not really. Files do not have an inherent MIME type. The MIME type of arbitrary content data is described in the header of the internet protocol used to transport the data (such as HTTP, SMTP, RTP, etc.).
The only other solution I could think of off the top of my head is using a trial-and-error process where you have a guess at the file type you're dealing with, and you test that guess by actually opening the file (in your code) and testing for success. But that's ugly.
Steav, your solution just looks at the response header, which might not be set correctly.
Easiest way would be using php, if possible:
$fileinfo['content-type'];

How to create and write data into a file using flex3?

I want to create a file and write some data (userid) into the file at first run of my application, during the second run all the operation (will go to the next state) based on the file data, is it possible? How to create and write data into file?
It depends if you're working on a pure-Flex or an AIR project.
If you are making an AIR application, you can access local files using the File class (more informations can be found here and here) ;
If not, you'll have to use a server-side script (PHP, ColdFusion, Java EE...) to do the job, calling it using a HTTPService object for instance.
If you are not concerned about file's location and max content of file is less than 100 KB then you may make use of Shared Objects in flash.

How I can export a datatable to excel 2007 and pdf from asp.net?

I have to make reports with graphics in Excel and PDF from data in a database in an asp.net app.
I don't want to use com objects so I have been using Open Xml Sdk to build the excel file from a template file and redirect the response to the new file generated but I don't know how to make the PDF file...
I accept any comments about how I can generate the pdf file in my web app...
Thanks by the time invested reading this...
go to this site for pdf.
http://itextsharp.sourceforge.net/
I've done this before but with a bit of a cheat.
Office XP and onwards can actually read html files as office documents so if you sent a html document containing a table with the extension and mime type of an excel doc then windows would open it in excel.
From there you can use a web service such as http://www.htm2pdf.co.uk/htm2pdf-web-service.aspx to convert the html table data into a pdf.
Even better than that if you change the extension of a docx or xslx file to zip you can unzip the stored files and you'll find they are xml files that you can edit and rezip (changing the extension back of course).
The easiest solution -- in my opinion -- is to use Client Report Definition Files. After you defined reports, you can
show them to users in your ASP.NET application using the ReportViewer component (Google for asp.net ReportViewer),
export them directly to Excel (Google for localreport excel),
export them directly to PDF (Google for localreport pdf).
For the last two options, you can either save the file to disk or send it directly to the asp.net client (again, there are lots of code examples on the web).

Resources