This project has moved. For the latest updates, please go here.

class not registered exception when connecting

Topics: User Forum
Dec 20, 2006 at 2:26 PM
i get this error when i try to connect to a remote winxp machine.

                            • Exception Text **************
System.Runtime.InteropServices.COMException (0x80040154): Class not registered (Exception from HRESULT: 0x80040154 (REGDBECLASSNOTREG))
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()
at System.Windows.Forms.Control.ControlCollection.Add(Control value)
at System.Windows.Forms.Form.ControlCollection.Add(Control value)
at Terminals.MainForm.CreateTerminalTab(FavoriteConfigurationElement favorite)
at Terminals.MainForm.Connect(String connectionName)
at Terminals.MainForm.tsbConnect_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.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.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.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)


                            • Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Terminals
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///D:/data/tools/terminals/Terminals.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GACMSIL/System.Windows.Forms/2.0.0.0_b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GACMSIL/System/2.0.0.0_b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GACMSIL/System.Drawing/2.0.0.0_b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
TabControl
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///D:/data/tools/terminals/TabControl.DLL
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GACMSIL/System.Configuration/2.0.0.0_b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GACMSIL/System.Xml/2.0.0.0_b77a5c561934e089/System.Xml.dll
----------------------------------------
AxInterop.MSTSCLib
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///D:/data/tools/terminals/AxInterop.MSTSCLib.DLL
----------------------------------------
Interop.MSTSCLib
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///D:/data/tools/terminals/Interop.MSTSCLib.DLL
----------------------------------------
Coordinator
Dec 31, 2006 at 4:07 AM
I remember that in some machines mstsc works fine but mstscax.dll which is the ocx we are using is not registered. Try registering this dll by running:
regsvr32 C:\Windows\System32\mstscax.dll
I think it will solve the problem.
Jan 17, 2007 at 1:37 PM
Hi,

I get the exact same problem and rgsvr32 didn't fix it i.e. regsvr32 succeeded in registering the .dll but the application still crashes at the same place as shown in the previous stack trace. Don't suppose you interop with any other COM components do you? Any ideas of how I would go about identifying the problem?
Jan 22, 2007 at 3:37 PM
We receive the same error as well even after registering the library as suggested.

This tool looks really promising as organization does quite a bit with terminal services.
Jan 22, 2007 at 10:02 PM
I get the following errors:


Error 1 The type or namespace name 'IMsRdpClientAdvancedSettings5' does not exist in the namespace 'MSTSCLib' (are you missing an assembly reference?) C:\Documents and Settings\Owner\Desktop\Terminals\Terminals\MainForm.cs 309 26 Terminals

Error 2 The type or namespace name 'IMsRdpClientAdvancedSettings5' does not exist in the namespace 'MSTSCLib' (are you missing an assembly reference?) C:\Documents and Settings\Owner\Desktop\Terminals\Terminals\MainForm.cs 309 122 Terminals

Error 3 The type or namespace name 'IMsRdpClient5' does not exist in the namespace 'MSTSCLib' (are you missing an assembly reference?) C:\Documents and Settings\Owner\Desktop\Terminals\Terminals\Settings.cs 388 65 Terminals



Jan 23, 2007 at 3:35 AM
I now get the following errors:

Error 1 The type or namespace name 'AxMsRdpClient2NotSafeForScripting' could not be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\Owner\Desktop\Terminals\Terminals\OptionsForm.cs 14 28 Terminals

Error 2 The type or namespace name 'AxMsRdpClient2NotSafeForScripting' could not be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\Owner\Desktop\Terminals\Terminals\OptionsForm.cs 29 17 Terminals

Error 3 The type or namespace name 'AxMsRdpClient2NotSafeForScripting' could not be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\Owner\Desktop\Terminals\Terminals\MainForm.cs 44 16 Terminals

Error 4 The type or namespace name 'AxMsRdpClient2NotSafeForScripting' could not be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\Owner\Desktop\Terminals\Terminals\MainForm.cs 903 17 Terminals

Error 5 The type or namespace name 'AxMsRdpClient2NotSafeForScripting' could not be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\Owner\Desktop\Terminals\Terminals\MainForm.cs 905 16 Terminals


Do I need to register something?
Jan 24, 2007 at 6:08 AM
We are working on a solution for this. Stay Tuned.
Jan 25, 2007 at 12:49 PM
I uploaded a new version of sources and binaries. Please test this version and let me know if you still have problems.
Jan 25, 2007 at 1:29 PM
No more errors.
Thank you.
Jan 26, 2007 at 2:46 PM
Same here. Works beautifully. Thanks.