"Class not registered" error when using EnterpriseServices transaction type.

"Class not registered" error when using EnterpriseServices transaction type.

Old forum URL: forums.lhotka.net/forums/t/12067.aspx


JohnRandall posted on Thursday, July 11, 2013

I added a the Enterprise Services transaction attribute to a DataPortal_Fetch of a BusinessListBase object.

If called internally, it fetches fine, and will rollback when an exception occurs, but when called through a web service I get "DataPortal.Fetch failed (Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"

In Expert CSharp 2008 Business Objects on page 519, we find:

"if you configure the data portal to run locally in the client process ... requires reference to System.EnterpriseServices.dll. It also has the side effect of requiring that Csla.dll be registered with COM+".  

As far as I know I have not configured the data portal to run locally (the only [RunLocal] I use is on methods that do not call the DataPoral), but since my error is related to registration I tried following these steps.

After adding the reference to EnterpriseServices, and registering Csla.dll with regsvcs.exe, I get the following error:

"DataPortal.Fetch failed (The ServicedComponent being invoked is not correctly configured (Use regsvcs to re-register).)"

I have tried re-registering, and also tried using regasm.exe, but to no effect.

It definitely is registered because I can see CSLA in Component Services under COM+ Applications. 

As a side note, DTC is enabled, and all firewalls are turned off.

I'm using visual Studio 2012, hosted on IIS 6.8. Operating system is Windows 8 64 bit. Build platform is set to AnyCPU.

Any help is appreciated. Thank you in advance. 

JohnRandall replied on Friday, July 12, 2013

Solved it. Wasn't a problem with CSLA - 32 bit applications had to be enabled on the application pool in IIS, since the COM component is 32 bit, as per this stackoverflow thread:

http://stackoverflow.com/questions/8562221/error-class-not-registered-exception-from-hresult-0x80040154-regdb-e-classnot 

Copyright (c) Marimer LLC