Windows Media Encoder object not created in ASP.NET on MS Server 2003 64 bit

Posted by Ron on Stack Overflow See other posts from Stack Overflow or by Ron
Published on 2010-03-14T13:49:40Z Indexed on 2010/03/14 13:55 UTC
Read the original article Hit count: 373

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 (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;
        }

    }
}

}

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET