How To Stream .flv Files In IIS7

Jun 18, 2010

I have a working solution on an IIS6, which I made using this guide: FLV Flash video streaming with ASP.NET 2.0, IIS and HTTP handler

The app is basically a FLV Player, but streaming is essential to it.

Now, one of our customers is running IIS7 and the streaming doesn't work.

View 2 Replies


Similar Messages:

Why Does IIS7 Ignore Content-type Header When Use Stream Files

Feb 9, 2010

I have a simple web site with two pages. One displays a list of files, and the other streams a file when it's clicked in the list. All was fine in production for 6 months, but now I have to move the site to Windows 2008/IIS7. I have it mostly working, but the files don't open properly (in Firefox) because my content-type header is being ignored. On the production site (IIS6) the headers are (using Fiddler):

HTTP/1.1 200 OK
Date: Tue, 09 Feb 2010 16:00:51 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Content-Disposition: attachment; filename="myfile__foo.pdf"
Content-Length: 236841
Cache-Control: no-cache, no-store
Pragma: no-cache
Expires: -1
Content-Type: application/octet-stream

but on the test IIS7 server I get:

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 236841
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
Content-Disposition: attachment; filename="myfile__foo.pdf"

Fiddler also reports a protocol violation and says "Content-length mismatch: Response Header claimed 236841 bytes, but server sent 238378 bytes."

My code looks like this:

[code]....

View 1 Replies

Stream .flv Files From SQL Database?

Dec 9, 2010

I want to store .flv files in the database and not in the file system.

This is what I can do right now: Successfully convert .wmv and .mpeg to .flv with ffmpeg. Store images in SQL Server and show them on my page with an httphandler. Same with .avi and .mpeg videos. (It's up to the user's software if he can view it though) Play .flv files in the browser if the file is located in the file system and not in the database.

What I can't do is: Stream .flv videos to JW Player directly from the database. (Stored as binary data)

I've searched the internet for two days now but I can't get it to work. It feels as if I'm almost there though. The JW Player opens up and starts to "buffer", but nothing happens.

I know there's no easy answer but if anyone has done this before, or something similar, I'd like to know how you did. I feel I've got too much code to post it all here.

View 3 Replies

Save A File / Stream To Local Folder From Response Output Stream?

Feb 22, 2011

I have an excel file in my Response Output stream. I can Open the stream as a file after a prompt, but it doesn't seem I can save it directly to a specified folder on my client.

View 1 Replies

Activate Form Authentication For CSV Files In IIS7?

Sep 28, 2010

I have a website on IIS 7. This website has a HttpModule with an AuthorizeRequest event handler. This event does not fire for CSV files and I can access the file without logging in, I guess this is because IIS7 is not configured to require form autentication for CSV files.

View 2 Replies

Iis7 - 3.5 Application With Multiple Web.config Files (IIS 7)

Nov 28, 2010

We are working on a web application that creates more web applications.Each web application will have to get a Url Rewrite rule (URL REWRITE MODULE 2.0).As far as I know, there's no way to add such rules without modifying the web.config file (am I right??).So my plan was to work with multiple web.config partial files. One main .config file, and lots of .config files per application (every file will contain it's web application url rewrite rules).This way sounds a little bit messy, but I can't think of anything else, and suggestions will be welcomed.

View 1 Replies

Refresh # Include Files - Caching On IIS7 / ASP?

Jul 28, 2010

I have an ASP.NET master page which references a #include file as follows:

<!--#include virtual="/includes/scripts.inc"-->

I have modified the file /includes/scripts.inc but the changes do not show up in pages. What needs to be done so modifications will be reflected? I need to avoid the following: restarting the server restarting IIS modifying web.config (doesn't appear to have any effect)
pretty much anything that causes the app domain to restart Any other options? Is there a setting which affects how long IIS caches #include files?

View 4 Replies

Iis7 - Preventing Upload Of Large Files?

Oct 25, 2010

We'd like to restrict the maximum upload file size in our web site. We've already set the appropriate limits in our web.config. The problem we're encountering is if a really large file (1 GB, for example) is uploaded, the entire file is uploaded before a server-side error is generated, and the type of the error is different whether the file is huge or not. Is there a way to detect the size of a pending file upload before the actual upload takes place?

Here's my relevant web.config settings that restrict requests to 16 MB:

[Code]....

Update:

I know that client-side technologies like Flash can detect file sizes before upload, but we need a server-side workaround because we're wanting to target platforms that have no Flash/Java/ActiveX/Silverlight support. I believe that IIS or ASP.NET has a bug that's allowing large files to be uploaded despite the limits, so I've filed a bug here.

Would an ISAPI extension give me more control over request processing than HTTP modules and handlers, such as allowing me to abort an upload if the Content-Length header is seen to be larger than the allowed limit?

Update 2:

Sigh. Microsoft has closed the bug I filed as a duplicate but has provided no additional information. Hopefully they didn't just drop the ball on this.

View 2 Replies

C# - Redeploying Site In IIS7 Without Files In Use Interfering?

Mar 12, 2010

We've got a process currently which causes ASP.NET websites to be redeployed. The code is itself an ASP.NET application. The current method, which has worked for quite a while, is simply to loop over all the files in one folder and copy them over the top of the files in the webroot.

The problem that's arisen is that occasionally files end up being in use and hence can't be copied over. This has in the past been intermittent to the point it didn't matter but on some of our higher traffic sites it happens the majority of the time now. I'm wondering if anyone has a workaround or alternative approach to this that I haven't thought of. Currently my ideas are:

Simply retry each file until it works. That's going to cause errors for a short time though which isn't really that good. Deploy to a new folder and update IIS's webroot to the new folder. I'm not sure how to do this short of running the application as an administrator and running batch files, which is very untidy.

Does anyone know what the best way to do this is, or if it's possible to do #2 without running the publishing application as a user who has admin access (Willing to grant it special privileges, but I'd prefer to stop short of administrator)? Edit Clarification of infrastructure... We have 2 IIS 7 webservers in an NLB running their webroots off a shared NAS (To be more clear, they're using the exact same webroot on the NAS). We do a lot of deploys, to the point where any approach we can't automate really won't be viable.

View 6 Replies

Web Forms :: Server 2008 R2 - IIS7 And Running .exe Files

Dec 9, 2010

I'm using ASP.net 3.5 to run a .exe with Process.Start(). It works fine if I use the host that's built-in to VS2008, WinServer 2003 but if I use IIS7 it no longer runs. I am using the following code.

Process proc =
new
Process();
proc.StartInfo = psi;
proc.StartInfo.FileName = "cmd.exe";
proc.StartInfo.Arguments = args;
proc.Start();

View 2 Replies

MVC :: VS2010 IIS7 Publishing Problem - Not All Files Transferred?

Jan 18, 2011

I've been building an MVC 2 site on my local machine which I then hoped to FTP to my companies IIS7 server.
When I first started using the MVC in VS2010 I published in VS via FTP and everything was fine, asp.net was properly installed and the mvc library was there.

Now I'm faced with a problem that I can hardly define, let alone get around:

When I attempted to publish, the controller folder wasn't being transferred, so I manually copied it across thinking it was just an FTP problem, but then I got errors complaining about an assembly reference in my web.config file:

Parser Error Message: Could not load file or assembly 'System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

So I'm guessing that whatever it is that is preventing VS transferring the controllers folder is doing the same with some of the MVC configuration stuff.

Another oddity is that thought the initial settings worked, I've since scrapped the orignal project and started again, I've had a look back at it and tried to use the original settings to FTP across but they now don't work and have the same problem, as does my bosses machine(previously unused version of VS) when I tried to FTP across the default MVC2 project.

VS reports that the FTP publish has succeeded and the controller files aren't listed in the Publish.XML file on either machine.

View 5 Replies

Download Of Large Files Slow When Content-length Specified (IIS7)?

Feb 4, 2010

I have an asp.net web page to serve large file downloads to users.

The page is hosted on IIS7, Windows Server 2008.

The strange thing is that users can download at good speeds (2MB/s) when I don't add a content-length response header but as soon as I add this header, download speed drops to somewhere around 35kbps/s.

This is the code:

[code]...

Of course I can leave the content-length out but the user will not know how big the file is and how long the download will take...which is annoying.

View 1 Replies

HttpHandlers / Modules :: Large Files Over Httphandler And IIS7 Out Of Memory?

Oct 4, 2010

I have a problem with large respones and IIS7, the server runs out of memory. I've written the test code below that works pretty much like my real code... When i start to download the file i can se the memory usage rise until it hits 100% and Firefox complaints about lost connection to server, looks like IIS7 does not release cache or something.. Works in IIS6 by the way

[Code]....

View 2 Replies

Web Forms :: Listing Files Inside A Directory, Iis7 Forcing 404?

Nov 3, 2010

I have some issues regarding listing images from inside a directory. What I want to do is to create a Default.aspx page that will search and list the images located inside a folder of my website (where I simply drop them in it). I tried with a treeview, DirectoryInfo and both worked when I compiled my website with visual studio, but when I access them via another computer, I get a 404 for the page. My bet is that iis7 is blocking my code from accessing the folder containing the images. Any idea of how to fix this and make it work ?the code I use to browse in my image folder

string path = AppDomain.CurrentDomain.BaseDirectory;
DirectoryInfo diFiles = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory + @"contentmiscimages");
foreach (var f in diFiles.GetFiles("*.jpg"))
{
Lit.Text += "<a href="" + f + ""rel="lightbox[img]" title=" + f + ">" + f + "</a>" + "<br />"; //I format the image as an url inside a literal
}

View 1 Replies

C# - Save Stream As Image And Store The Image In Temp Files?

Sep 6, 2010

How to save stream as image and store the image in temp files?

View 4 Replies

Security :: Stream Image Files From Folder Outside App Folder?

Jun 16, 2010

I have a folder with png images that are not shared or public (the folder is outside my application folder). Now I want my users to be able to view thoose images only if they are logged in (different users, different images). All images have a name that correspond to the users id. My idea is to stream thoose images into the asp:Image control, is that possible? How do I do that? Other (better) solutions?

View 6 Replies

How To Read XML File Using System.IO.Stream With LINQ / Cannot Convert From 'System.IO.Stream' To 'string'

Jul 19, 2010

i will be passing the xml file like this:

[code]....

error:

Error 1 The best overloaded method match for 'System.Xml.Linq.XDocument.Load(string)' has some invalid arguments

cannot convert from 'System.IO.Stream' to 'string'

View 2 Replies

How To Detect The End Of Stream

Jun 29, 2010

1) I notice that the module gets it's data in chunks. This is problematic for me because I'm using a regex to find and replace. If I get a partial match in one chunk and the rest of the match in the second, it will not work. Is there any way to get the entire response before I do my thing to it? I have seen code where it appends data to a string builder until it uses a matches on an "" end tag but my code must work for more that just (xml, custom tags, etc). I don't know how to detect the End Of Stream or if that is even possible.

View 1 Replies

Can Stream A File In C#

Dec 20, 2010

Assume we have the access to sth.avi on [URL] with a direct link.

e.g : [URL] Also we have a website => www.dl2.com.

Now, we wanna let some users to download sth.avi from [URL], but we don't have enough space on [URL] to save sth.avi. Is it possible in ASP.NET for us to read sth.avi from www.dl.com as streaming file and share it without saving the file on our domain.

P.S: I don't wanna share this link [URL], actually I wanna share something like this link [URL]

View 3 Replies

C# - Return XML To The Response Stream?

Nov 10, 2010

I'm trying to return an xml string from a IHttpHandler to a like this: context.Response.Write(xml); When I receive the response in my .aspx.cs I try to load the document as follows: var xml = XDocument.Load(xmlString); but I get an Illegal Characters in Path error message. I've also tried

context.Response.Write(context.Server.HtmlEncode(xml));

and

var xml = XDocument.Load(Server.HtmlDecode(xmlString));

but I get the same message. Is there any way I can return XML from my IHttpHandler?

View 3 Replies

Convert Stream To Zip File

Aug 29, 2010

I have made a WCF web service that streams a 200 mb zip file. how i can read this stream at my client and then give option to the user to download that

View 1 Replies

Video Stream Sugestions Anyone?

Dec 16, 2010

I am looking to add video stream into my web application for webcams.owever, I have never used the .NET framework to do so. Any ideas were I should start?

View 9 Replies

C# - How To Safely Read From A Stream

Nov 11, 2010

byte[] bytes = new byte[uploader.UploadedFiles[0].InputStream.Length];
uploader.UploadedFiles[0].InputStream.Read(bytes, 0, bytes.Length);
var storedFile = new document();
string strFullPath = uploader.UploadedFiles[0].FileName;
string strFileName = Path.GetFileName(strFullPath);
storedFile.document_id = Guid.NewGuid();
storedFile.content_type = uploader.UploadedFiles[0].ContentType;
storedFile.original_name = strFileName;
storedFile.file_data = bytes;
storedFile.date_created = DateTime.Now;
db.documents.InsertOnSubmit(storedFile);
db.SubmitChanges();

If:

Reading from a stream in a single call to Read is very dangerous. You're assuming all the data will be made available immediately, which isn't always the case. You should always loop round, reading until there's no more data.

How should I change the above code to make it 'less dangerous'?

View 1 Replies

Check Whether Asf Stream Is Actually Playing?

Jan 18, 2010

I have a website built in ASP.NET 2.0 and a Windows Server 2003 server streaming live videos with Windows Media Services.

To play the content i usually embed a Windows Media Player in my page and make it open the publication URL (let's say http://my.server.com/live), and it works fine.

The problem is that when no stream is playing, an empty stopped player appears and i don't like that

So i'd like to check in my (VB) code if there's actually something being streamed BEFORE i open the player, and display a 'no active stream right now, please try later' message instead.

View 5 Replies

Extracting Zip From Stream With DotNetZip?

Feb 19, 2011

public void ZipExtract(Stream inputStream, string outputDirectory)
{
using (ZipFile zip = ZipFile.Read(inputStream))
{
Directory.CreateDirectory(outputDirectory);
zip.ExtractSelectedEntries("name=*.jpg,*.jpeg,*.png,*.gif,*.bmp", " ", outputDirectory,
ExtractExistingFileAction.OverwriteSilently);

[Code]....

I try to read zip archive from stream and extract files. Got the following exception in the line "using (ZipFile zip = ZipFile.Read(inputStream))" : ZipEntry::ReadDirEntry(): Bad signature (0xC618F879) at position 0x0000EE19. how to handle this exception?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved