未在MS Server 2003 64位的ASP.NET中创建Windows Media编码器对象 [英] Windows Media Encoder object not created in ASP.NET on MS Server 2003 64 bit

查看:99
本文介绍了未在MS Server 2003 64位的ASP.NET中创建Windows Media编码器对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我在MS Server 2003 64位的Microsoft Visual C#2008 Express Edition中创建(并使用)了Windows Media编码器对象.效果很好.

但是,当我尝试在MS Server 2003 64位上使用Microsoft Visual Web Developer 2008创建等效的Windows Media编码器对象时,引发了以下异常:

由于以下错误,检索具有CLSID {632B606A-BBC6-11D2-A329-006097C4E476}的组件的COM类工厂失败:80040154."

不一定是未注册组件,因为它们都引用了相同的WMEncEng.dll文件. Microsoft Visual Web Developer 2008代码在32位XP上也能正常工作.

权限可能有问题吗?无论如何,任何人都不会知道为什么会出现此问题,更重要的是,如何解决它?

谢谢.

这是MS Server 2003 64位的两个代码段:
Microsoft Visual Web Developer 2008(无效):

Hello,

I created (and used) a Windows Media Encoder object in Microsoft Visual C# 2008 Express Edition on MS Server 2003 64 bit. This worked fine.

However, when I attempted to create the equivalent Windows Media Encoder object using Microsoft Visual Web Developer 2008 on MS Server 2003 64 bit, the following exception was thrown:

"Retrieving the COM class factory for component with CLSID {632B606A-BBC6-11D2-A329-006097C4E476} failed due to the following error: 80040154."

It cannot be that the component isn’t registered, because both have a reference to the same WMEncEng.dll file. The Microsoft Visual Web Developer 2008 code also worked fine on XP 32 bit.

Could it be a problem with permissions? Regardless, anyone have any ideas why this problem is occurring and, more importantly, how to resolve it?

Thank you.

Here are the two code snippets from MS Server 2003 64 bit:
Microsoft Visual Web Developer 2008 (did not work):

using System;
using WMEncoderLib;

namespace TestWMEnc
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                WMEncoder encoder = new WMEncoder(); //exception thrown
                // ...

            }
            catch (Exception err)
            {
                string exception = err.Message;
            }

        }
    }
}



Microsoft Visual C#2008 Express Edition(工作正常):



Microsoft Visual C# 2008 Express Edition (worked fine):

using System;
using System.Windows.Forms;
using WMEncoderLib;

namespace testWMEncoder
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                WMEncoder encoder = new WMEncoder();
                // ...

            }
            catch (Exception err)
            {
                string exception = err.Message;
            }

        }
    }
}

推荐答案

我要做的第一件事是确保您的代码正在x86而不是Any CPU上编译.

您不能在同一进程中同时使用32位和64位代码.
The first thing I''d do is make sure you code is being compiled x86 instead of Any CPU.

You cannot combine both 32-bit and 64-bit code in the same process.


这篇关于未在MS Server 2003 64位的ASP.NET中创建Windows Media编码器对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆