I'm trying to stream a live feed to a Publishing Point but keep getting 'Access is Denied' errors. I can do this just fine in the Expression Encoder application (using a valid username and password). But when I try to use the same username/password in my custom app, I get that error. I've tried pre-connecting without credentials, which fires the AcquireCredentials event.
So I know its connecting to the server just fine, but my user credentials are being denied through my custom app. Any idea what the problem is? Here's a snippet of my code (if it helps):
LiveJob job = new LiveJob();
LiveDevice audioDevice = (LiveDevice)cmbAudioDevices.SelectedItem;
LiveDevice videoDevice = (LiveDevice)cmbVideoDevices.SelectedItem;
LiveDeviceSource liveSource = job.AddDeviceSource(videoDevice, audioDevice);
job.ActivateSource(liveSource);
System.Runtime.InteropServices.HandleRef h = new System.Runtime.InteropServices.HandleRef(panel1, panel1.Handle);
job.DeviceSources[0].PreviewWindow = new PreviewWindow(h)
{
Visible = true
};
System.Security.SecureString password = new System.Security.SecureString();
foreach (char letter in txtPassword.Text.ToCharArray())
password.AppendChar(letter);
job.OutputFormat = new WindowsMediaPublishingPointOutputFormat()
{
PublishingPoint = new Uri(txtPublishPoint.Text)
UserName = txtUsername.Text,
Password = password
};
job.PreConnectPublishingPoint();
Any thoughts?