IWMSPublishingPoint.DistributionUserName (Visual Basic .NET)
Previous | Next |
IWMSPublishingPoint.DistributionUserName (Visual Basic .NET)
The DistributionUserName property retrieves the user name provided by the client in response to an authentication challenge sent during server-to-server distribution.
Syntax
IWMSPublishingPoint .DistributionUserName = String String = IWMSPublishingPoint.DistributionUserName
Property Value
A String containing the user name.
If this property fails, it returns an error number.
Number | Description |
0x8007000E | There is insufficient memory to complete the function. |
0xC00D145AL | The publishing point was already removed. |
Remarks
You can use a password and the name returned by the DistributionUserName property to retrieve content from a publishing point on a remote server that has authentication and authorization plug-ins enabled.
Example Code
Imports Microsoft.WindowsMediaServices.Interop Imports System.Runtime.InteropServices Private Sub GetUserName() ' Declare variables. Dim Server As WMSServer Dim PubPoints As IWMSPublishingPoints Dim PubPoint As IWMSPublishingPoint Dim bVal As Boolean Dim strText As String Try ' Create the WMSServer object. Server = New WMSServer() ' Retrieve the IWMSPublishingPoints object. PubPoints = Server.PublishingPoints ' Retrieve information about each publishing point. For Each PubPoint In PubPoints ' Retrieve a Boolean value indicating whether ' a distribution password is set. bVal = PubPoint.IsDistributionPasswordSet ' Retrieve the distribution user name associated ' with the publishing point. strText = PubPoint.DistributionUserName Next Catch excCom As COMException ' TODO: Handle COM exceptions. Catch exc As Exception ' TODO: Handle errors. Finally ' TODO: Clean-up code goes here. End Try End Sub
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 |