Microsoft KB Archive/812635

= INFO: Supplemental Logging Information for Windows Media Services 9 Series =

Article ID: 812635

Article Last Modified on 11/23/2006

-

APPLIES TO


 * Microsoft Windows Media Services 9 Series

-



SUMMARY
This article contains supplemental information about logging in Windows Media Services 9 Series. The following topics are listed in this article:
 * Configuration parameters of the standard logging plug-in
 * Configuration parameters of the ISAPI logging plug-in
 * Log files are still not created
 * Information about log file encoding

Warning This article contains information about editing the namespace. Before you edit the namespace, verify that you have a backup copy that you can restore if a problem occurs. If you edit the namespace incorrectly, you can cause serious problems that may require you to reinstall any product that uses the namespace. Microsoft cannot guarantee that problems that result if you incorrectly edit the namespace can be solved. Edit the namespace at your own risk.

IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, see the following Microsoft Web site:

https://partner.microsoft.com/global/30000104

For additional information about the support options available from Microsoft, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS



Configuration Parameters of the Standard Logging Plug-in
By default, the logging plug-in will stop logging when there is less than 10% of available drive space. This prevents the log file from taking up the whole hard disk. However, there are some scenarios where it is not realistic to stop logging after you reach the 10% threshold.

For example, if a hard disk is 100 gigabytes (GB), the plug-in stops logging when only 10 GB of hard disk space remains free. If this threshold is reached, you may receive the following error in the Event log or in the Troubleshooting tab of the Windows Media Server MMC Snap-In:

0x0000015C: Successfully opened log file  but nothing has been written to the file because the disk space is limited. Logging will resume when additional disk space is made available.

You can, by means of the Windows Media Services 9 Series Object Model, configure the logging plug-in so that it stops logging at different thresholds. Following is a code sample that shows one way that you can do this by modifying the Object Model using a script.

For more information, see the Windows Media Services 9 Series Software Development Kit. // This code is a sample that programmatically sets the FreeSpaceQuota. // You must be an Admin on the Windows Media Server to run this sample. // You must restart the services after running this script. // // Copy this text and save it as LogQuota.js on the Windows Media Server. // Run the script from a command prompt.

var objServer = null; var objLogPlugin = null; var objLogPluginAdmin = null; var szArgServer = &quot;LOCALHOST&quot;; var szTemp = &quot;&quot;;

// This integer value can be 0 - 100 and represents a percentage of the disk size var iNewSpaceQuota = 5;

try {   objServer = new ActiveXObject( &quot;WMSServer.server&quot;, szArgServer ); } catch(e) {   szTemp = &quot;Server '&quot; + szArgServer + &quot;' is not a valid WMS Server \n&quot;; WScript.Echo (szTemp); WScript.Quit(1); }

try {   objLogPlugin = objServer.EventHandlers(&quot;WMS Client Logging&quot;); objLogPluginAdmin = objLogPlugin.CustomInterface;

WScript.Echo (&quot;Old Quota: &quot; + objLogPluginAdmin.FreeSpaceQuota + &quot;%&quot;); objLogPluginAdmin.FreeSpaceQuota = iNewSpaceQuota; WScript.Echo (&quot;New Quota: &quot; + iNewSpaceQuota + &quot;%&quot;); } catch(e) {   szTemp = &quot;Error setting Logging Plugin\n&quot;; WScript.Echo (szTemp); WScript.Quit(1); }

Configuration Parameters of the ISAPI Logging Plug-in
The ISAPI logging plug-in (Multicast and Advertisement Logging Plug-in) is an optional add-in by means of the Windows Components Wizard to allow multicast clients to post back logging information. You can use these registry keys to modify the properties of the Wmsiislog.dll application extension.

The following table provides information about the property values, which are stored in the following registry key:

 

Important Note the following when using the ISAPI logging DLL:
 * If you move Wmsiislog.dll to another Web server for logging, you must manually register it on the server by typing r egsvr32 wmsiislog.dll at the command prompt. If you use this application on a Web server without registering it, the default values are used.
 * If you change the default logging directory, you must grant the Multicast and Advertisement Logging Agent permissions to write to that directory. For the statistics to be successfully written to the log file, grant READ, WRITE, and MODIFY permissions to the Network Service account and IWAM_HOSTNAME.
 * Multicast streaming and the WMS Multicast Data Writer plug-in are available only if Windows Media Services 9 Series is running on the following two editions of the Windows Server 2003 operating system: Enterprise Edition and Datacenter Edition. These features are not supported if you are running Windows Server 2003, Standard Edition.
 * The Wmsiislog.dll will work only on IIS version 6.0 or later. It cannot be used with earlier versions of IIS.

Log Files Are Still Not Created
If log files are not created, you can use several troubleshooting techniques:
 * For the ISAPI DLL and the WMS Client Logging, hard disk space might potentially be the problem.
 * If there is plenty of hard disk space (over the FreeSpaceQuota), check permissions to the various logging directories.
 * The NETWORK SERVICE account requiresREAD, WRITE, and MODIFY permissions to the logging directory.
 * For the ISAPI logging DLL, the IWAM_HOSTNAME also requires permissions (see the &quot;Important&quot; note earlier in this article for more details).

Depending on the server configuration, the NETWORK SERVICE account may also require LIST FOLDER CONTENTS permissions to the root of the drive where the logging directory is located. For example, if logs are being stored in E:\LogDir\WMSLogs, then NETWORK SERVICE requires LIST FOLDER CONTENTS permissions for the E:\ drive.

Information About Log File Encoding
The WMS9S Logging Plug-in can log files in two formats:
 * Windows Media Services format
 * Legacy (Windows Media Services 4.1) format

Some programs and logging applications require that log fields are formatted the same as in the previous version of the server. In these cases, use the Legacy format.

In addition to two formats, the WMS9S Logging Plug-in can log using either Unicode (UTF-8) characters or ANSI characters. Unicode is the current standard for text encoding because it supports the widest range of languages and character sets. The WMS9S Logging Plug-in now adds an extra field to the log header to identify the type of encoding that was used in the file. This is identified by the #EncodingFormat: in the log header.

In certain instances, the WMS9S Logging Plug-in writes a Byte Order Mark (BOM) to the beginning of UTF-8 encoded files. Some legacy applications do not understand this data at the beginning of the file and do not parse a log file. To know whether the plug-in will set these bytes, see the following table:

In order to be completely compatible with the v4.1 Server logging format, you must select Legacy Format logs and ANSI encoding. If Legacy UTF-8 logs are created, unicode data can be logged to the file, but, depending on the application, may show extra characters before the #Software field in the log header. Using ANSI formats will cause unicode characters to be translated to ANSI characters in the log files.

