Share via


Including Files in the ASP Page

When you install the Windows Media Services Web Administrator, various include files are copied into the <%systemroot%>\system32\windows media\server\admin\web\wmssecure\pages\plugins\include folder. These are used by the Windows Media Services Web administration pages and by the sample ASP property pages included with the SDK. You can therefore use them to help create a custom ASP property page for your plug-in. The following tables identify the files and functions that you might find useful.

Note

   To install the Windows Media Services Web Administrator, click Details on the Windows Media Services Setup dialog box, click Windows Media Services Administrator for the Web, and click OK.

Wmscommon.inc

The Wmscommon.inc file contains a general set of server-side functions used by most ASP plug-in administration pages. The following table identifies functions that can be used for writing an ASP property page. This is not a complete list of the functions in the file.

Function

Description

BoolToText

Changes a Boolean value to either "true" or "false".

BrowserSniff

Identifies the client's browser and stores the information in a global variable.

ConvertPPName

Changes the name of the default publishing point from "/" to "<Default>".

DashesToNonbreak

Changes a dash character to a minus sign.

DetectSpecifiedChars

Detects special characters. For more information, see https://support.microsoft.com/support/kb/articles/Q252/9/85.ASP.

DisableContextMenu

Disables the right mouse button.

EscBackslashChar

Replaces the backslash character ( \ ) with two backslashes ( \\ ).

FormatDateAsUTC

Converts a local date to Universal Time Coordinate (UTC) representation.

jsTRYjsCatch

Used together to add error handling if an exception handler exists in the script.

PickStyleSheet

Determines which style sheet to use depending on the browser.

PPIDToIndex

Retrieves the index number of the requested publishing point given its GUID.

PPNameToIndex

Retrieves the index number of the named publishing point.

RedirectIfLegacyBrowser

Redirects the user to an alternate page if the browser version is out of date.

RemoveDangerousCharacters

Removes special characters from a string. For more information, see https://support.microsoft.com/support/kb/articles/Q252/9/85.ASP.

RemoveSpecifiedChars

Removes the specified regular expression pattern from a string. For more information, see https://support.microsoft.com/support/kb/articles/Q252/9/85.ASP.

SafeEscapeSafeUnescape

Safely encodes a URL.

SpacesToNonbreak

Replaces white space in a string with a non-breaking space character entity reference ( &nbsp; ).

TrimFileColon

Eliminates the "file://" prefix from a file path.

URLDecode

Attempts to reverse the effect of a call to Server.URLEncode by restoring escaped strings to their original form.

Wmsconnect.inc

The Wmsconnect.inc file contains general-purpose functions that establish server and publishing point connections. This file is used by Wmsplugins.inc. The following table identifies functions that can be used for writing an ASP property page. This is not a complete list of the functions in the file.

Function

Description

ConnectToNamedServer

Establishes a connection to the specified Windows Media server and starts or stops the service.

ConnectToNamedPubPoint

Establishes a connection to the publishing point specified by a name.

ConnectToPubPoint

Establishes a connection to the specified publishing point. Calls the ConnectToPubPointID function.

ConnectToPubPointID

Establishes a connection to the publishing point specified by a GUID.

ConnectToServer

Establishes a connection to a Windows Media server.Calls the ConnectToNamedServer function.

LatchCurrentPage

Stores the current page and query string to remember the page that you visited last.

WMSConnectASPCleanup

Releases various global variables.

Wmsconstants.inc

The Wmsconstants.inc file contains predefined constants. These include global color definitions, bounds checks, property tab and dialog box constants, plug-in categories, server object model constants, and regular expressions.

Wmserror.inc

The Wmserror.inc file contains error handling functions. The following table identifies functions that can be used for writing an ASP property page. This is not a complete list of the functions in the file.

Function

Description

AlertUserWithPopupErrorDialog

Displays a dialog box containing information about an error. This function requires JScript on the browser.

BeginErrorHandling

Initializes the error handler for the current page.

EndErrorHandling

Can be called in a page that implements error handling to determine whether the page needs to be reloaded to display error messages.

ErrorDetected

Returns a Boolean value that indicates whether an error was detected and sets state variables so that the AlertUserWithPopupErrorDialog and OnErrorGoBack functions can be called.

OnErrorGoBack

Returns the user to the last visited page and removes the current page from the browser's history buffer.

RenderWithErrorCheck

Uses formatted text to display the HTML code that caused the error.

Wmsheader.inc

The Wmsheader.inc contains functions that create standard HTML page headers. The following table identifies a function that can be used for writing an ASP property page. This is not a complete list of the functions in the file.

Function

Description

WriteHTMLHeader

Creates a standard HTML header for a specified page title.

Wmspagebanner.inc

The Wmspagebanner.inc file contains functions that create page banners for the Windows Media Services Web administrator. The following table identifies a function that can be used for writing an ASP property page. This is not a complete list of the functions in the file.

Function

Description

DrawPluginBanner

Writes the names of the server and plug-in at the top of the ASP property page and displays a security warning if the page is not secure.

Wmsplugins.inc

The Wmsplugins.inc file contains functions that retrieve the server or publishing point objects. The following table identifies functions that can be used for writing an ASP property page. This is not a complete list of the functions in the file.

Function

Description

ConnectToPlugin

Retrieves the server or publishing point object and sets the global plug-in collection pointer based on the plug-in category.

ConnectToPluginAdmin

Retrieves the custom administration interface for the plug-in.

GetFormStr

Retrieves a value from a form.

GetPostOrQsVal

Retrieves a value from a form or query string.

PluginASPCleanup

Releases various global variables.

ValidateInput

Grays out the OK button so that it can only be clicked once.

WriteStdPluginForm

Creates a standard form containing all of the features necessary to maintain state.

See Also

Concepts

Creating an ASP Property Page