.NET Expression SDK LiveJob 身份验证

发布于 2024-08-14 18:56:23 字数 1123 浏览 4 评论 0原文

我正在尝试将实时源流式传输到发布点,但不断收到“访问被拒绝”错误。我可以在表达式编码器应用程序中很好地完成此操作(使用有效的用户名和密码)。但是,当我尝试在自定义应用程序中使用相同的用户名/密码时,我收到该错误。我尝试过在没有凭据的情况下进行预连接,这会触发 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

原来是服务器权限问题。能够安装第二个盒子连接就好了。

Turns out there was a server permissions issue. Was able to install a second box connect just fine.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文