Retrieving the COM class factory for component with CLSID {6BF52A52-394A-11D3-B153-00C04F79FAA6} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))


  • I am getting this error when I try to access my web page.  The code looks like:


    public void playAudio() {
    	today = DateTime.Today.ToShortDateString();
    	DataSet ds = getAnnouncements(today);
    	WindowsMediaPlayer wmp;
    	wmp = new WindowsMediaPlayer();
    	wmp.URL = ds.Tables[0].Rows[0]["Audio"].ToString();
    	wmp.settings.autoStart = true;
    The Souce Error highlites the row:
    wmp = new WindowsMediaPlayer();
    I have this library: 
    using WMPLib;
    From my searches, that was all that was said that I would need to use it.
    This error is telling me a class is missing, but the Interop.WMPLib.dll is in my project Bin file.
    I am on a Windows 7 computer using .Net 4 with my website.
    Please Help!

    • Edited by Darth Levi Tuesday, September 06, 2011 11:07 PM
    • Moved by Lie You Tuesday, September 27, 2011 1:27 AM ASP.Net related. (From:Visual C# General)
    Tuesday, September 06, 2011 11:05 PM

All replies