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 |
IWMSPublishingPoint.IsDistributionPasswordSet (C#)
The IsDistributionPasswordSet property retrieves a Boolean value indicating whether the password used to authenticate server-to-server distribution is set.
Syntax
=
PublishingPoint
.IsDistributionPasswordSet;
Property Value
A bool that indicates whether the password is set.
If this property fails, it throws an exception.
| Number | Description |
| 0xC00D145AL | The publishing point was already removed. |
Remarks
This property is read-only. Indicates whether the password used to authenticate server-to-server distribution is set. The default value is a zero-length string.
Example Code
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Declare variables.
WMSServer Server;
IWMSPublishingPoints PubPoints;
IWMSPublishingPoint PubPoint;
bool bVal;
string strText;
try {
// Create a new WMSServer object.
Server = new WMSServerClass();
// Retrieve the IWMSPublishingPoints object.
PubPoints = Server.PublishingPoints;
// Retrieve information about each publishing point.
for (int i = 0; i < PubPoints.Count; i++)
{
PubPoint = PubPoints[i];
// Retrieve a Boolean value indicating whether
// a distribution password is set.
bVal = PubPoint.IsDistributionPasswordSet;
// If there is no password set, enforce a new one.
if (bVal == false)
{
strText = "password";
PubPoint.DistributionPassword = strText;
}
}
Requirements
Reference: Add a reference to Microsoft.WindowsMediaServices.
Namespace: Microsoft.WindowsMediaServices.Interop.
Assembly: Microsoft.WindowsMediaServices.dll.
Library: WMSServerTypeLib.dll.
Platform: Windows Server 2003 family, Windows Server 2008 family.
See Also
| Previous | Next |