1

Closed

Error HRESULT E_FAIL has been returned from a call to a COM component

description

Sometimes getting following error after integrating with "WCF with EntLib". Any advise on following error?
 
Error 2 Error HRESULT E_FAIL has been returned from a call to a COM component. 0 0

file attachments

Closed Sep 26, 2008 at 3:08 PM by davidslot
Problem solved

comments

davidslot wrote Sep 23, 2008 at 7:22 AM

I've seen this error showing up when the project mapping table is broken. You might be referring to a non existing path in the project mapping table.
When exactly did you get this error?

ashokborate wrote Sep 23, 2008 at 1:45 PM

I am getting this error while building the solution. In "service implementation\generated code" code file contains "An unexpected exception has occurred while generating code. Check the Error List Window."

I have not moved solution from created location at all.

If I change implementation technology to WCF, then it works fine.

davidslot wrote Sep 23, 2008 at 2:22 PM

Ok and what file is showing you "An unexpected exception has occured while generating..."?
<Servicename>.cs or <Servicename>Impl.cs ?

Maybe you can copy the original dll files and text templates of the extension to your servicefactory installation folder again (plz refer to EntLib_Extensions_to_WSSF_VS2008_Installation.doc chapter 1). See if this helps.

ashokborate wrote Sep 23, 2008 at 2:49 PM

I am getting this error in service implementation project. Attached is screenshot when I generate code on servicecontracts design surface.

wrote Sep 23, 2008 at 2:49 PM

davidslot wrote Sep 25, 2008 at 7:34 AM

The error is indicating a broken reference (for example to a project or assembly). Could you attach a screenshot of your ServiceImplementation project with all folders (also reference-folder) expanded? Maybe it's unable to find any of the entlib or custom WCF validator assemblies.

ashokborate wrote Sep 25, 2008 at 8:14 AM

In ServiceImplementation project, all the files are getting generated with error message in it. Although ServiceContract files are getting generated properly. Screenshots of expanded ServiceImplementation project are attached.

wrote Sep 25, 2008 at 8:14 AM

ashokborate wrote Sep 25, 2008 at 8:16 AM

Continuation of screenshot

wrote Sep 25, 2008 at 8:16 AM

davidslot wrote Sep 25, 2008 at 1:02 PM

I see you're missing references to Avanade.PolicyInjection.WcfValidationCallHandler.Design.dll and Avanade.PolicyInjection.WcfValidationCallHandler.dll. Probably because these files don't exist in the EntLib Bin folder.
Copy these files (included in the binary release zip-file) to your Entlib Bin folder (usually C:\Program Files (x86)\Microsoft Enterprise Library 4.0 - May 2008\Bin)

ashokborate wrote Sep 26, 2008 at 1:36 PM

My MISTAKE, had missed last step in installation. Wanted to drive a car without reading manual.

Thanks for your patience.

wrote Sep 26, 2008 at 3:08 PM

ruifavas wrote Oct 23, 2008 at 8:53 AM

did anyone find a solution for this problem??

yuratanya wrote Nov 5, 2008 at 8:43 PM

I have experinceeed this error when I switched to EntLib 4.1. Works perfictly fine in 4.o. Please fix it fot 4.1. Thanks a lot

wrote Feb 2, 2013 at 3:04 AM

wrote May 14, 2013 at 4:16 AM