1
Vote

Retrieving the COM class factory failed

description

On one machine with win 8.1, office 2013 got an exception (others with the same components are ok)
What could be causing this?
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80080005.

Ex.Source: mscorlib
Ex.TargetSite: AllocateUninitializedObject

Stack trace: 
   at System.Runtime.Remoting.RemotingServices.AllocateUninitializedObject(RuntimeType objectType)
   at System.Runtime.Remoting.RemotingServices.AllocateUninitializedObject(Type objectType)
   at System.Runtime.Remoting.Activation.ActivationServices.CreateInstance(Type serverType)
   at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(Type serverType, Object[] props, Boolean bNewObj)
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
   at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at NetOffice.COMObject.CreateFromProgId(String progId)
   at NetOffice.COMObject..ctor(String progId)
   at NetOffice.ExcelApi.Application..ctor()
   at BclAccounting.MainForm.ExportViewToExcel(GridView View)
   at BclAccounting.MainForm.ExportToExcelToolStripButton_Click(Object sender, EventArgs e)

comments

SebastianDotNet wrote Jan 18, 2015 at 4:43 AM

The stack trace indicates its a security issue. Limitless reasons possible so far...Make sure the application doesnt start from a network location or usb-stick, whatever in a normal deskop session. Check UAC settings, so Excel want started without a break. Make sure your application and excel was in the same privileges level.

(Troubleshooting tip: Disable all excel (COM)addins temporaily to make sure the problem is not a third party addin)

*Sebastian

Niemand wrote Jan 19, 2015 at 9:54 AM

Make sure the application doesnt start from a network location or usb-stick
Normal desktop.
Disable all excel (COM)addins temporaily to make sure the problem is not a third party addin
Not using any.
Check UAC settings, so Excel want started without a break. Make sure your application and excel was in the same privileges level.
How exactly?

long1000 wrote Nov 15, 2016 at 7:28 AM

Any update to this problem?
I'm having the same issue running Office 2013 on Win2012.
Thanks.

SebastianDotNet wrote Nov 16, 2016 at 9:43 AM

I need to see some caller code.
What you try to do? I need to know this to reproduce the scenario.

The id :{00024500-0000-0000-C000-000000000046} is the point of interest here.
NetOffice failed to find a wrapper class for a COM type with this interface id.
I need to know what is this (awaiting) type to clearify the situation.

*Sebastian