Skip to main content

Google Search

Custom Search

Live Search

Yahoo Search

Search the web Search this site

Class not registered

Recently when I tried to build and run an existing .Net application code I got the following error which generated from a component named “axShockwaveFlash1” which is an object used to embed flash content on to the application.

System.Runtime.InteropServices.COMException was unhandled
  Message=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 Tour_Management_System.Loading_Form.InitializeComponent() in D:\Projects\Acc\TMS_20100205_Desktop\Tour_Management_System 2010-01-19\Tour_Management_System\Form1.Designer.cs:line 99
       at Tour_Management_System.Loading_Form..ctor() in D:\Projects\Acc\TMS_20100205_Desktop\Tour_Management_System 2010-01-19\Tour_Management_System\Form1.cs:line 30
       at Tour_Management_System.Program.Main() in D:\Projects\Acc\TMS_20100205_Desktop\Tour_Management_System 2010-01-19\Tour_Management_System\Program.cs:line 18
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()

After some investigation I found that the reason for this was Flash Player’s incompatibility with 64 bit. Since my machine is running Windows 64 bit version it generates an error while trying to start Flash player. Good thing is Adobe is planning to release a Flash player which supports 64 bit soon.

For people who cannot wait until that (like me) can fix the problem in the following manner by running the application as an x86 application by changing the target platform in project properties.

Step 1 - Right click on your project and click on the properties.

Step 2 - Click on the Build tab and select x86 as the Platform target:.

Step 3 - Rebuild the application and run it, you will not get the error.


Anonymous said…
This comment has been removed by a blog administrator.
Anonymous said…
Complex Post. This post helped me in my college assignment. Thnaks Alot

Popular posts from this blog

"Login failed. The login is from an untrusted domain and cannot be used with Windows authentication."

If you are getting the above error while trying to connect to a database, the reason is you are using Windows Authentication to login to the SQL Server while being in another untrusted domain. For example if the SQL Server machine is a member of the CompanyDomain and if you are in MyDomain or if you are in a Workgroup the you will face the above issue while trying to connect to the SQL Server.The connection string used in the web.config while the above error is generated is as follows.

<connectionStrings>  <addname="cnnStr"connectionString="Data Source=BI-SVR;Initial Catalog=BBIDatabase;Integrated Security=True"/></connectionStrings>

There are three ways to fix this problem.1. Use the SQL Authentication to login to the SQL Server.You can get this done by changing the connection string to use SQL authentication while connecting. But you need to know the credentials of an account which is having permissions to your required database or the System Admi…

Enabling Hibernate in Windows

Some server versions of Windows are having the hibernate feature disabled by default. So if you need to change the hibernation do the following simple steps.1. Click start and type “cmd” or type command in the search box.2. Then in the search results, right click the Command Prompt and click on Run as Administrator.3. If you are prompted by the user account control click continue.4. Then,To turn hibernation on in your machine type - “powercfg.exe /h on” or “powercfg.exe /hibernate on”To turn hibernation off in your machine type - “powercfg.exe /h off” or “powercfg.exe /hibernate off”5. Lastly you can exit the command prompt by typing “exit”.Sometimes you might get an error similar to the following while trying to enable hibernation.Hibernation failed with the following error: The request is not supported. The following items are preventing hibernation on this system.
        An internal system component has disabled hibernation. This means your machine is running roles or …

Enable Hibernation and Sleep in Windows Server 2008 R2

Normally when you install Hyper-V role in your server, it will disable sleep and hibernate facilities provided by Windows.But you can avoid this by doing some alterations to Windows.Hibernate and seep features are disabled when the Hyper-V service is started, so you can regain hibernate and sleep by changing the start parameter of the Hyper-V service (hvboot).To change,1. Open the registry editor by typing “regedit” in the run window.Locate the key,HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\hvboot and then set the start value of it to 3.Start property can hold the following values.0Boot (Not supported by hvboot.)1System2Auto3On Demand4Disabled Now you will have the hibernate and sleep facilities until you start the Hyper-V services in your machine. 2. Type the following command in a command prompt window with administrative rights. sc config hvboot start= demand Note that there needs to be a space between the = sign and the word demand.