Control not getting registered on a win 2k Machine

I have a .DLL with a user control in it. On most of the machines we have installed this on, we have not had any problems. However I am having a problem with a win 2000 machine. Here is the error as lister.

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Runtime.InteropServices.COMException (0x80040154): Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.AxHost.EndInit()
at Dispatch.QAControl.InitializeComponent()
at Dispatch.QAControl..ctor()
at Dispatch.frmQA.AddControl(Int32& I)
at Dispatch.frmQA.RefreshDisplay()
at Dispatch.frmQA.mnuNone_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


Anyone know what to do? Had this problem before? I have uninstalled and re-installed. Changed the project type to web control library, to a class library, change register for com interop from on to off back to on. I am tired of creating installs. Anyone out there able to help?
[3117 byte] By [sotoasty] at [2007-11-20 11:38:42]
# 1 Re: Control not getting registered on a win 2k Machine
What ActiveX control are you using? What steps have you taken in order to register it?
jmcilhinney at 2007-11-10 3:08:12 >
# 2 Re: Control not getting registered on a win 2k Machine
Basically, just created a setup file. In the setup file I went from regforCOM to doNotregister. I also tried to RegAsm my .dll and it registered but still the same error.
sotoasty at 2007-11-10 3:09:12 >
# 3 Re: Control not getting registered on a win 2k Machine
Do you not see any error message ?
Krishnaa at 2007-11-10 3:10:11 >
# 4 Re: Control not getting registered on a win 2k Machine
The error message is (from the first line...)

Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)

It pops up with the normal error message screen with the continue button.

It looks like my QAControl is in my dispatch .DLL is not getting registered. I am going to trying the install on several different machines shortly.
sotoasty at 2007-11-10 3:11:16 >
# 5 Re: Control not getting registered on a win 2k Machine
The error is from the first line. I get an error dialog box (with the continue button).

This is the error.

System.Runtime.InteropServices.COMException (0x80040154): Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

I have to assume it is from the QAControl in my dispatch.DLL. Some how it is not getting registered in the install. I am going to be trying several different installs shortly.

Thanks
sotoasty at 2007-11-10 3:12:20 >
# 6 Re: Control not getting registered on a win 2k Machine
RegAsm is a tool to register .NET assemblies as COM objects so they can be accessed by COM applications. That's not you. You should using RegSrv because you want to register a genuine COM object to be accessed from a .NET app. That said, in your Setup project you should be using ComSelfReg for your ActiveX/COM components.
jmcilhinney at 2007-11-10 3:13:23 >