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.

  string  sUserName
  string  sPassword

Property Value

This property does not return a value.


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.


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

// Declare variables.
WMSServer            Server;
IWMSPublishingPoint  PubPoint;

    // 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.


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


IWMSPublishingPoint Object (C#)