Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
.gif)
| Previous | Next |
IWMSAdminRealm.Realm (C#)
The Realm property specifies and retrieves the name of the realm that is presented to a client when prompted for a user name and password. The realm string is used to distinguish one site from another.
Syntax
AdminRealm .Realm = string; string = AdminRealm.Realm;
Property Value
A string containing the authentication realm. This must not exceed 251 characters.
If this property fails, it throws an exception.
| Number | Description |
| 0x80070057 | The string containing the realm exceeds 251 characters. |
Example Code
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Declare variables.
WMSServer Server;
IWMSPlugin Plugin;
IWMSAdminRealm AdminRealm;
try {
// Create a new WMSServer object.
Server = new WMSServerClass();
// Retrieve the plug-in to be configured.
Plugin = Server.Authenticators[
"WMS Digest Authentication"];
// Retrieve the custom interface of the plug-in.
AdminRealm =
(IWMSAdminRealm)Plugin.CustomInterface;
// Set the name presented to a client
// upon user name and password requests.
AdminRealm.Realm = "MyRealm";
}
catch (COMException comExc) {
// TODO: Handle COM exceptions.
}
catch (Exception e) {
// TODO: Handle exceptions.
}
Requirements
Reference: Add a reference to Microsoft.WindowsMediaServices.
Namespace: Microsoft.WindowsMediaServices.Interop.
Assembly: Microsoft.WindowsMediaServices.dll.
Library: WMSServerTypeLib.dll.
Platform: Windows Server 2003, Enterprise Edition; Windows Server 2003, Datacenter Edition; Windows Server 2008.
See Also
| Previous | Next |