.NET Expression SDK LiveJob 身份验证
我正在尝试将实时源流式传输到发布点,但不断收到“访问被拒绝”错误。我可以在表达式编码器应用程序中很好地完成此操作(使用有效的用户名和密码)。但是,当我尝试在自定义应用程序中使用相同的用户名/密码时,我收到该错误。我尝试过在没有凭据的情况下进行预连接,这会触发 AcquireCredentials 事件。
所以我知道它与服务器的连接很好,但我的用户凭据被我的自定义应用程序拒绝。知道问题是什么吗?这是我的代码片段(如果有帮助):
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();
有什么想法吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
原来是服务器权限问题。能够安装第二个盒子连接就好了。
Turns out there was a server permissions issue. Was able to install a second box connect just fine.