Enterprise Service runtime exception

Enterprise Service runtime exception

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


louis.leung posted on Friday, October 06, 2006

Hi,

The application that I'm developing is a 3-tier windows form app.  The client (ie. windows form) is installed in Machine A (XP Home SP2), and the app server and database are both installed in Machine B (XP Pro SP2).  I chose Enterprise Service as the mean of communication between the client and the app server to test out the performance.

I followed the instructure for implementing Enterprise Sservice as suggested in the "Expert C# 2005 Business Objects" book.  I installed the COM+ application on the app server machine with no problem.  I also installed the .msi generated by the COM+ on the client machine with no problem.

However, when I run my client, the following exception was thrown.  I tried googling for answers, making sure that DTC is enabled at both client/server, double checking that the COM+ is started at the server machine, but still can't find the answer.

Anyone seen this exception before or can give me some help ?  Thanks in advance.

-Louis


System.Runtime.InteropServices.COMException was unhandled
Message="Changes to this object and its sub-objects have been disabled (Exception from HRESULT: 0x8011042A)"
Source="System.EnterpriseServices"
ErrorCode=-2146368470
StackTrace:
at System.EnterpriseServices.RegistrationThreadWrapper.PropInstallResult()
at System.EnterpriseServices.RegistrationHelper.InstallAssemblyFromConfig(RegistrationConfig& regConfig)
at System.EnterpriseServices.RegistrationHelper.InstallAssembly(String assembly, String& application, String partition, String& tlb, InstallationFlags installFlags)
at System.EnterpriseServices.RegistrationHelper.System.EnterpriseServices.Thunk.IThunkInstallation.DefaultInstall(String asm)
at System.EnterpriseServices.Thunk.Proxy.RegisterAssembly(Assembly assembly)
at System.EnterpriseServices.Thunk.Proxy.LazyRegister(Guid id, Type serverType, Boolean checkCache)
at System.EnterpriseServices.Thunk.Proxy.CoCreateObject(Type serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String& uri)
at System.EnterpriseServices.ServicedComponentProxyAttribute.CreateInstance(Type serverType)
at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(Type serverType, Object[] props, Boolean bNewObj)
at EnterpriseServicesHost.EnterpriseServicesProxy.GetServerObject() in C:\Data\Work\alpha\src\Rapid\ESHost\EnterpriseServicesProxy.cs:line 13
at Csla.DataPortalClient.EnterpriseServicesProxy.Fetch(Type objectType, Object criteria, DataPortalContext context) in C:\csla\csla20cs\csla20cs\Csla\DataPortal\Client\EnterpriseServicesProxy.cs:line 52
at Csla.DataPortal.Fetch(Type objectType, Object criteria) in C:\csla\csla20cs\csla20cs\Csla\DataPortal\Client\DataPortal.cs:line 184
at Csla.DataPortal.FetchT(Object criteria) in C:\csla\csla20cs\csla20cs\Csla\DataPortal\Client\DataPortal.cs:line 138

RockfordLhotka replied on Friday, October 06, 2006

It sure looks like .NET is trying to do some configuration of the COM+ proxy on the client. Perhaps there's some issue with the way the msi was created or run. Certainly that's where you should focus your research, is on the procedure to register a COM+ application on the client.

mel2401 replied on Wednesday, May 02, 2007

Hi Louis.

I am experiencing the same problem you had with enterprise services and was hoping that you may have had some success in getting round it. I have communicated with rocky but unfortunately he doesn't seem to have any ideas at the moment apart from the possibility that XP home SP2 doesn't support enterprise services. I am using XP Pro SP2 so that is not an issue for me anyway. Any help you can give me would be greatly appreciated.

Regards,
Mel

RockfordLhotka replied on Wednesday, May 02, 2007

You know, in looking at the stack trace again there may be a clue.

Notice about 3-5 lines down into the trace, there's a call to do an install. EnterpriseServices will automatically try to install your assembly into COM+ if it isn't there already, but that takes administrator rights, and really isn't sufficient (because there's extra config that must be done manually).

Is it possible that the assembly somehow isn't installed on the server?

Certainly it appears that something isn't installed on the server. I'm guessing it isn't your object that can't be changed (that would be a very odd exception if that were the case), but rather that a registry object can't be changed, or that a metadata object for COM+ can't be changed.

Though I don't have a solution, I thought I'd offer up this in the hopes that it provides some insight Smile [:)]

Copyright (c) Marimer LLC