IWMSPublishingPoint.SetDistributionUserNamePassword (C#)

The SetDistributionUserNamePassword method specifies the password and user name to use in response to an authentication challenge sent during server-to-server distribution.

IWMSPublishingPoint.SetDistributionUserNamePassword(
  string  sUserName
  string  sPassword
);

Property Value

This property does not return a value.

Remarks

You can use a password and name to retrieve content from a publishing point on a remote server that has authentication and authorization plug-ins enabled.

Example

using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;

// Declare variables.
WMSServer            Server;
IWMSPublishingPoint  PubPoint;

try 
{
    // Create a new WMSServer object.
    Server = new WMSServerClass();

    // Retrieve the sample publishing point.
    PubPoint = Server.PublishingPoints["Sample_Broadcast"];

    // Specify the user name and password.
    PubPoint.SetDistributionUserNamePassword("User", "Password");

}
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
}
catch (Exception) 
{
    // 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 family, Windows Server 2008 family.

See Also

Reference

IWMSPublishingPoint Object (C#)