Link to home
Start Free TrialLog in
Avatar of mscb_30
mscb_30Flag for Brazil

asked on

Error 80040154 Class not registered on IIS 8

Hello,

I´ve been using for years without any problems a DLL that I created with VB.NET being called by an aspx page .

Last month, I moved the web site to a new server running IIS 8.

Since then, all clients are receiving the error 80040154 when they try to call this DLL.

Searching in internet, I found several posts saying how to solve this error.

Some of them, ask me to:

- Recompile DLL changing Target CPU from AnyCPU to X86, then enable 32 bits applications on Application Pool;

- Change Application Pool identity to Localsystem;

- Recompile DLL to 64 bits;

None of then worked.

Someone has an different idea about how to solve this ?

My Environment is:

Windows Server 2012 with IIS8

Visual Studio 2013 using VB.net to compile the DLL


Important: On my machine (Windows 7) with IIS, all things work well.

Thanks in Advance.

Marcio Branco.
Avatar of Dan McFadden
Dan McFadden
Flag of United States of America image

Are you sure that you are not missing any dependencies for your DLL?  Can you post the stack trace that comes along with the error message?

What .NET Framework are you using?  2 (3 & 3.5) or 4.0+?  Are these frameworks on the 2012 server?

Also, here is another possibility.  Article describes a hack.

Link:  http://www.gfi.com/blog/32bit-object-64bit-environment/

<soapbox>
As a side note, saying its been working for years on IIS7, in no way indicates the likelyhood that it will work on a new windows server platform.  You need to know all your DLLs dependencies and have them documented.  There is the possibility that it won't work on a clean installation of 2008 & IIS7... especially if there are unknown dependencies.
</soapbox>

Please excuse the soapbox...

Dan
Avatar of mscb_30

ASKER

Hi Dan,

we´re using .net 4.0.

Yes, .net is installed on the server. This dll is used for both, IIS and .exe files. We tested the dll with .exe files without problems in the same machine that IIS is installed.

I will try the post from GFI.com.

Thanks ,,,
Avatar of mscb_30

ASKER

See the stack trace:

[COMException (0x80040154): Retrieving the COM class factory for component with CLSID {E1BD8337-FDF5-3B5A-B15E-9B86B3321831} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +113
   System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +232
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +83
   System.Activator.CreateInstance(Type type) +66
   System.Web.HttpServerUtility.CreateObject(String progID) +133
   _Default.cmdLogin_Click(Object sender, EventArgs e) in E:\Sites\Cadastro de Funcionarios\Default.aspx.vb:19
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9628462
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +103
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724

Open in new window

Avatar of mscb_30

ASKER

I tryed to follow the post from GFI.com, but I was no luck.

The post asks to find in the registry the folder "HKey_Classes_Root\Wow6432Node\CLSID\[GUID]", but the class "{E1BD8337-FDF5-3B5A-B15E-9B86B3321831}" does not exists.
There is your issue.  Your error message is looking for that specific CLSID.  Essentially somehting is either not properly registered on the new server... or... you have not installed all dependent software.

I would create the GUID in the location mentioned above and then continue on with following the steps in the article.

Dan
Avatar of mscb_30

ASKER

Hi Dan,

The DLL that I´m Trying to use, was created with Visual studio and installed by a package from Visual Studio Installer.

This always worked until this new version of IIS.

The path that I´m trying to follow now is about 32 bits DLLs with 64 bits IIS.
SOLUTION
Avatar of Dan McFadden
Dan McFadden
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial