-
Live Smooth Streaming: How-to: Retrieve the configuration settings programmatically
3 CommentsIn my previous post, I explained how the Microsoft.Web.Administration API of IIS7 helped us to manage the Live Smooth Streaming Publishing Points programmatically. In this post I’m going to show you how, using the same API, you can retrieve the Live Smooth Streaming configuration settings.
First, let’s take a look at the Live Smooth Streaming configuration settings window

The main idea here is to read the Live Streaming configuration section and get the attributes values from there. The piece of code looks like:
const string LiveStreamingSectionPath = "system.webServer/media/liveStreaming"; ServerManager serverManager = new ServerManager(); Configuration configuration = serverManager.GetApplicationHostConfiguration(); ConfigurationSection section = configuration.GetSection(LiveStreamingSectionPath); if (section != null) { foreach (ConfigurationAttribute attribute in section.Attributes) { Console.WriteLine("{0}: {1}", attribute.Name, attribute.Value); } Console.ReadLine(); }
Running the preceding code will output the following:

As you see, reading the configuration settings is easy and can enable you different scenarios, for example, deleting the archived streams of a publishing point.
If you want to take a look at the Live Smooth Streaming schema, go to %windir%\System32\inetsrv\config\schema and open the IISMedia_LiveStreaming_schema.xml file.Happy streaming!
-
3 Comments:
Leave a comment
Your email address will not be published.

DotNetKicks.com said on July 2, 2009:
Live Smooth Streaming: Retrieving the configuration settings via code…
You’ve been kicked (a good thing) – Trackback from DotNetKicks.com…
DotNetShoutout said on July 2, 2009:
Live Smooth Streaming: How-to: Retrieve the configuration settings programmatically…
Thank you for submitting this cool story – Trackback from DotNetShoutout…
Servefault.com said on October 15, 2009:
Live Smooth Streaming: How-to: Retrieve the configuration settings programmatically…
Thank you for submitting this cool story – Trackback from Servefault.com…