Menu
Menu
Follow Us
Blog
 
Printable Version Printable Version Recommend Recommend Email to a friend Email to a friend

Configuring For Video: How to Prepare Your DotNetNuke (DNN) Website to Handle Video

Blog post on setting up and preparing a DotNetNuke website to manage video files.  Server and IIS configuration is discussed to handle file types and large files.
03/28/2012
Getting a DotNetNuke site ready to handle a video library doesn’t have to be a daunting task.  It does help to do a little bit of upfront work to know where potential issues might occur, though.  Video files can become very large and the management can be incredibly cumbersome.  It doesn’t help that upload speeds are usually slower than download speeds. On top of that, video files frequently require additional processing after uploading is complete. Close your eyes and pretend it’s all a bad dream. That’s how I get by.

This post is to discuss getting ready for video uploading and processing on your DotNetNuke website. It does not cover any encoding/conversion processes or display issues, however. The focus is to get the website ready for accepting video files and uploading.

CMS file setup

The first thing to do is make sure that your website can accept the correct type of files. This is handled in 2 different locations – the CMS itself and IIS (or your server software). In DNN there is a host setting that determines the file types that are allowed to be recognized, uploaded, and managed within the system. It is located at the Host -> Host Settings -> Other Settings screen. Below is a screen shot:

DNN Host File Extension Settings

DNN Host File Extension Settings

MIME Types

The next step is to make sure that IIS (Internet Information Server) understand the file types that it can serve. This is accomplished through registering something called MIME types. Most Microsoft .NET / SQL server hosting environments come setup with flash file MIME types already configured (flv files). It seems that this is because, historically, flash files were the most common video file format. This has changed quite a bit in the last couple years. While flash is still the highest percentage market share for delivering high quality videos, the landscape is changing very quickly particularly as mobile takes more and more of the internet traffic. Going beyond flash, to MP4 or M4V, for instance, which are the most common video file extensions for mobile video, extra steps are needed.

IIS 7

Adding a mime type is as simple as adding the following XML snippet to the <system.webServer />
section of your web config file is usually required. These settings do vary from site to site, so if you're not comfortable managing your server environment, you should contact your site administrator. This will add the mime type for mp4 files. Repeat this process for m4v files or any other type required.

<staticContent>
    <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
</staticContent>


IIS 6

Adding a mime type requires direct access to the IIS management software (although some hosting applications allow adding a mime type directly). Follow these instructions:
1. Find the website within the list and right-click to open the “Properties” dialog.

2. Click the “HTTP Headers” tab. The screen should look like the one below:

IIS Property Settings - HTTP Headers

IIS Site Properties Settings - Mime Types 2


3. Click the “Mime Types” button in the bottom right corner to bring up the screen below.

IIS Site Property Settings - MIME Types

IIS Site Properties Settings - Mime Types 3


4. Click “New”.

IIS Site Property Settings - Specify MIME Types

IIS Site Properties Settings Mime Types


5. In the MIME type box, type a description that exactly matches the file type defined on the computer. If you define a MIME type that has already been defined at a higher level, you are prompted to select the level where the MIME type should reside. Examples of the descriptions can be found above in the image under step 3.

6. Click OK.

Timeout Settings

Video files can be very large and therefore can take quite a lot of time to upload and process. To make sure that the website doesn’t stop running in the middle of processing, some steps may need to be taken. There is a setting inside of the web.config file that controls how long that a process can run before it times out. This setting is called "executionTimeout". DotNetNuke does not have this setting in the web.config file by default and therefore used the lowest setting available within IIS (I believe it is 60 seconds that is set in the machine.config file). Changing (or adding) this setting to a larger timeframe will provide DNN with more time to process any individual request before timing out.

To find the appropriate location in the web.config file, search for the text “httpRuntime”. Then copy and replace the below XML snippet and paste it over the existing code:
<httpRuntime useFullyQualifiedRedirectUrl=”true” maxRequestLength=”2097151” requestLengthDiskThreshold=”25819200” executionTimeout=”3600” />
The values shown are the values that are used on packflash.com and are set at the maximum values for a .NET application. These are set very high due to video uploading and processing needs. These values may not be appropriate for your website. The definition of these items is included to allow a decision to be made on what settings are appropriate for each situation.

maxRequestLength is the setting that determines the largest file that can be processed by the application - in this case of PackFlash.com this is DotNetNuke. The value of the setting is in kb. This is set very high for packflash.com that allows for very large video file uploading.

requestLengthDiskThreshold is the amount of buffer that will be allowed before the file will start being written to disk. This is in kb as well.

executionTimeout is the time that a single process within the application (DNN) can take before IIS causes a timeout. This is set in seconds. We have this set very high because of video processing needs.

In DNN 6, a setting for “Web Request Timeout” was added to the Host -> Host Settings -> Proxy Settings area.It is difficult to tell what it actually does, because my internal testing didn’t change anything. It may have an effect on the performance of the system, however. This setting is in seconds and the default of “10000” represents almost 2.8 hours (2 hours and 47 minutes). Below is a snapshot of this screen.

DotNetNuke Host Proxy Settings

DotNetNuke Host Proxy Settings

 

In IIS 7, an additional step need to be taken. Add this section of code to the <system.webServer> node. NOTE: The “maxAllowedContentLength” represents the file size in bytes.

<security>

    <requestFiltering>

        <requestLimits maxAllowedContentLength=”3000000” />

    </requestFiltering>

</security>


Please provide comments on this subject in the comments section below.

Comments (0)

 
PackFlash| Superior DotNetNuke Solutions| 415 N. Lasalle Street, Suite 205, Chicago, IL 60654| success@packflash.com
Home | DotNetNuke Modules | Skins & Design | Website Services | Demos | About Us | Contact Us | Blog
Copyright 2019 by PackFlash