Gorgo.Live.ToString()

Mariusz, Gorzoch tech Blog

Archive for the ‘TFS2012’ Category

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

leave a comment »

I have a site hosting application with retrieve some data from TFS 2012 thru TFS API. It was working fine till someone restart. From that point I’ve started to get bellow error:

Error HRESULT E_FAIL has been returned from a call to a COM component.
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace:

[COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.]
   Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore.DataStoreNative.UpdateMetadata(IntPtr handle, Object rowset, String dbstamp, UInt32& changes) +0
   Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore.Datastore.UpdateMetadata(Object rowset, String dbstamp) +57
   Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.EndBackendCall(BackendCallData data) +275
   Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.RefreshCacheInternal(BackendCallData& data) +204
   Microsoft.TeamFoundation.WorkItemTracking.Client.WorkI
temStore.InitializeInternal() +565

I’m still looking for the solution, but what seems to work is:

– add user hosting web site to local admin on the machine

– add user hosting web site to project admins from with you retrieve data

– open team web access (TWA) on user hosting web site on your local machine

– open team web access (TWA) on user hosting web site on the server hosting the solution

This makes web site to work again. Some of above steps are for sure not necessary, but I need above problem to occur again to eliminate some of them. I’ll keep updating that post till I find what exactly is needed to fix above.

Once the web site is back again, then you can undo all above steps and the site will keep working even if you restart IIS.

Written by Mariusz Gorzoch

20 March 2014 at 13:04

Posted in TFS2012

Tagged with