KeyLimeTie Blog

Windows 2003 Server does not stream FLV videos

By Brian Pautsch – 1/16/2007. Posted to Thoughts.

A friend of mine came across a problem trying to stream a FLV video on his customer's website. Before deploying it to their web server, he tested it successfully on his local machine and on a UNIX test server...no problems. Once he migrated the code and FLV file to the Production Windows 2003 Server, it didn't work anymore. He figured out the problem and told me about it.

Issue
When Flash Player movie files that stream external FLV files (Flash videos) are placed on a Microsoft Windows 2003 server and then viewed in a browser, the SWF file plays correctly, but the FLV video does not stream. These files work correctly if tested on other operating systems. The issue affects all FLV files played via Windows 2003 server, including files made with the Flash Video Kit for Dreamweaver MX 2004.

This TechNote describes the steps necessary to allow Windows 2003 to stream Flash Video files.

Note: These instructions are provided as a courtesy for customers and address the issue in Microsoft Internet Information Services (IIS) 6.0 rather than Flash.

Reason
With IIS 6.0, Microsoft changed the way streaming media is handled. Previous versions of IIS did not require any modification to stream Flash Video. Microsoft IIS 6.0, the default web server that ships with Windows 2003, requires a MIME type to recognize that FLV files are streamed media.

Solution
Please be aware that these steps do not resolve any issue with Flash, but are a configuration step for Microsoft Windows 2003 and Microsoft IIS Server 6.0. Any difficulties in executing these instructions or any errors that may arise from modifying your system settings should be addressed to Microsoft. For more details, please refer to your IIS documentation.

1. On the Windows 2003 server, open the Internet Information Services Manager.
2. Expand the Local Computer Server.
3. Right-click the local computer server and select Properties.
4. Select the MIME Types tab.
5. Click New and enter the following information:
    Associated Extension box: .FLV
    MIME Type box:flv-application/octet-stream
6. Click OK.
7. Restart the World Wide Web Publishing service.

Source
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19439

Microsoft Enterprise Library - Hosting in "Medium Trust" Environment

By Brian Pautsch – 1/4/2007. Posted to Applications.

I have been using the Microsoft Enterprise Library for many years now. For the first time, I had serious problems deploying them to a production environment today. After about an hour of searching online, I found out that a lot of people were having this problem and only a few people had figured out how to resolve it. Here's what I did....very easy, very fast.

Problem:
Deployed web application with any Microsoft Enterprise Library component and received the follow error:

Server Error in '/' Application

Required permissions cannot be acquired.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Security.Policy.PolicyException: Required permissions cannot be acquired.

Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:
[PolicyException: Required permissions cannot be acquired.]
System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) +2736869
System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) +57

blah blah blah...

Explanation:
Simply put, the Microsoft Enterprise Library is trying to perform operations that it is not allowed based on the trust level set on that server.
I have never received this error before since I host all of my code on my own dedicated servers (where I have a "Full" trust set).
Recently, I have been opening accounts for customers at WebHost4Life.com (I'm sort of trying to get out of the hosting business due to the liabilities). WebHost4Life must also have the trust level set to "Full" since I've never had problems there. Just today, I deployed code to a new hosting provider. I believe they have their trust level set to "Medium" and this is why I'm getting the error.

Resolution:
1. A few months ago, Microsoft released updated code to resolve this issue.
Click here to download the code updates

2. For any application block to read information from configuration files, it is necessary to grant the application ConfigurationPermission (which is not provided by default in medium trust). You can add the requirePermission="false" attribute to the application's configuration section definitions. For example:
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="dataConfiguration" requirePermission="false"
type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings,
Microsoft.Practices.EnterpriseLibrary.Data"
/>
</configSections> . . . </configuration>
That's it...pretty easy and fast.

Photos on Flickr

More Photos »

Search Blog


Get Email Updates

Like what you read here at KeyLimeTie? Sign up for our email list!

Subscribe