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
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.
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.
<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
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.
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: