Introduction
Web Playlists for Internet Information Services 7 (IIS 7.0) provides the ability to control media delivery to the client and limit the client’s ability to seek or skip individual entries in the playlist. The server administrator may enable or disable seek / skip behavior through fields in the playlist entry.
This feature exists as a Request Handler for the IIS pipeline. The actual playlist database is stored in separate .ISX files.
This article contains:
Scope
This article describes the steps to setup the Web Playlists module and helps understand the settings possible through the configuration files.
Prerequisites
- IIS 7.0: This module installs over IIS 7.0.
- .NET Framework: This feature has a user interface (UI) that requires the .NET Extensibility role service if you are running the Web Server (IIS) role on Windows Server® 2008 or the .NET framework if you plan to install on Windows Vista®.
Setup
Windows Installer Package
Web Playlist setup is a simple operation in which you download the Windows Installer Package playlist .MSI and then run it.
Configuration
Schema Attributes
Before creating a playlist, be aware of the following playlist handler attributes. These attributes are defined in the handler schema and can be set through the applicationHost.config file.
|
Rule Attribute |
Required |
Type |
Permissible Values |
Default Value |
Description |
|
allowAbsolutePaths |
No |
Bool |
True/False |
False |
Specifies whether absolute paths and UNC paths are allowed as media entries in the playlist. It is good to keep it False unless only administrators can create playlists. If this value is set to True, Web Playlist could be used to download any file on the server by specifying the absolute path. This will also depend on the credentials assigned to the application pool. |
| allowSkipAfterMinPercent |
Yes |
Uint |
Any unsigned integer |
0 |
If skip forward (Next), skip backward (Previous) is disabled, this value determines when it is enabled again. For example, the value of 80 signifies that Next is enabled after 80 percent of the data has been downloaded from the server for the playlist entry. |
|
defaultSessionProvider |
No |
String |
A valid string corresponding to a name in the sessionProviders collection |
InMemory |
Specifies what session persistence provider is being used to store the playlist session information. There are two available with the default installation – InMemory and ASP.NET . |
|
inactivityTimeout |
No |
Uint |
Any unsigned integer |
120 |
This is the time in minutes after which an inactive playlist session expires. An inactive playlist session is a session on the Web server where no data is being downloaded from the server. |
|
timeToLive |
No |
Uint |
Any unsigned integer |
1440 |
This is time in minutes after which the playlist session ends even if it is active. This attribute protects the content by ensuring that the playlist session has a finite life. |
|
maxConcurrentConnections |
No |
Uint |
Any unsigned integer |
4 |
This is the maximum number of active connections possible on a playlist session. |
Schema
The playlist handler schema is a part of the media section group and playlist configuration section under the System.webServer. The playlist handler uses the following playlist schema that is contained in the playlist_schema file that ships with the feature.
<!--
<sectionGroup name="media">
<section name="playlist" />
</sectionGroup>
-->
<configSchema>
<sectionSchema name="system.webServer/media/playlist">
<attribute name="allowAbsolutePaths" type="bool" defaultValue="false" />
<attribute name="defaultSessionProvider" type="string" defaultValue="InMemory" />
<element name="sessionProviders">
<collection addElement="sessionProvider" allowUnrecognizedAttributes="true" >
<attribute name="name" type="string" required="true" isUniqueKey="true" />
<attribute name="persistenceType" type="string" />
<attribute name="inactivityTimeout" type="uint" defaultValue="120" />
<attribute name="timeToLive" type="uint" defaultValue="1440" />
</collection>
</element>
<element name="sessionOptions”>
<attribute name="maxConcurrentConnections" type="uint" defaultValue="4" />
<attribute name="allowSkipAfterMinPercent" type="uint" defaultValue="0" />
</element>
<element name="accessOptions">
<collection addElement="accessOption">
<attribute name="path" type="string" isUniqueKey="true" />
<attribute name="userName" type="string" />
<attribute name="password" type="string" caseSensitive="true" encrypted="true" defaultValue="[enc:AesProvider::enc]" />
<attribute name="logonMethod" type="enum" defaultValue="ClearText">
<enum name="Interactive" value="0"/>
<enum name="Batch" value="1"/>
<enum name="Network" value="2"/>
<enum name="ClearText" value="3"/>
</attribute>
</collection>
</element>
</sectionSchema>
</configSchema>
Scenarios
1. Configuration for Shared Hosting
A server is shared by multiple sites. Each site has its own administrator and there is a super administrator for the server. In this case, the super administrator must ensure that site administrators have freedom within their site homes and at the same time do not have access to another site's content and other aspects. The super administrators also needs to protect essential server resources from being accessed by any of the sites. The site administrators or their users could have access to creating new playlists.
Set the allowAbsolutePaths=false.
Important: This is the most important step. If this is not done, any lower level site admin can add any file on the server to his/her playlist and that, in turn, would be downloaded for them. This can be a security issue. By default, this setting is set to False in the handler config.
All other settings could have the default values.

2. Configuration for Enterprise Setup
A server is used for an enterprise. The enterprise users do not create the playlist; only the super administrator for the server can. The content to be used in the playlist is scattered across local / remote locations on the enterprise network.
Set the allowAbsolutePaths=true.
This is needed, as otherwise Web Playlist fails when it tries to access local paths (e.g., C:\mydir) or remote UNC paths (e.g., \\myServer\media). Since the super administrator is the only one creating the playlist, the risk of making this setting true is minimal. By default, this setting is set to False in the handler config.
All other settings could have the default values.
Refer to screen shots in the previous scenario.
3. Persisting Session State
There is a server farm front-ended with a load balancer. This means there is no guarantee that all requests will come to the same server. Also, as the session is stored in the memory of the IIS worker process by default, if the worker process were to re-cycle for some reason, the session information would be lost. These scenarios imply that session state persistence is needed.
Set the persistenceType=ASP.net.
This will make use of ASP.NET session state persistence to store the session data.
Prerequisite
- This scenario requires that ASP.NET be installed and ASP.NET Session state management be configured. This may be configured through the IIS Manager.
Limitations
- As this persistence requires ASP.NET, it does not work with Server Core installations of Windows Server 2008.
- Using ASP.NET session state persistence requires IIS to run in integrated mode for that application pool.
- For this beta release, AllowSkipAfterMinPercent should be set to 0. Client-side logic is needed to enforce Skip/seek behavior for rogue clients

More Information
1. ASP.net Session State Persistence Overview - http://support.microsoft.com/kb/307598
2. ASP.net Session State Persistence could be configured from the IIS Manager using the steps below:
a. Open the IIS Manager and click on Session State.
b. Configure the desired settings. A detailed discussion is beyond the scope of this article. Web Playlist supports all variations of ASP.NET session state persistence.
Comments