How to configure DCOM configuration for Export To Excel?

0

I am implementing Export To Excel functionality in one of my asp.net application. I have two servers(QA and Development). In Development server it works fine but in QA server i am getting below error.

    An exception of type System.Runtime.InteropServices.COMException occurred and was 
caught. Source:mscorlib;Message:Retrieving the COM class factory for component with CLSID 
{00024500-0000-0000-C000-000000000046} failed due to the following error: 8000401a The 
server process could not be started because the configured identity is incorrect.  Check the username and password. (Exception from HRESULT: 
0x8000401A).;Target:System.MarshalByRefObject AllocateUninitializedObject(System.RuntimeType);StackTrace:   at 
System.Runtime.Remoting.RemotingServices.AllocateUninitializedObject(RuntimeType objectType)     at 
System.Runtime.Remoting.Activation.ActivationServices.CreateInstance(RuntimeType serverType)     at 
System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(RuntimeType serverType, Object[] props, Boolean bNewObj)     at 
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& 
bNeedSecurityCheck)     at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)     at 
System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)     at 
System.Activator.CreateInstance(Type type, Boolean nonPublic)     at System.Activator.CreateInstance(Type type)     at XXXXXXXXXXXXX  Method - XXXXXXXXXXXXX

I have configured same thing in both servers but still QA server not working properly. What should i do next? Any idea...??

asp.net
export-to-excel
dcom
asked on Stack Overflow Dec 3, 2012 by user968441

2 Answers

0

Is Excel 2000 installed on your QA server ? At least it wasn't able to startup the automation...

Source: http://support.microsoft.com/kb/292491/en-us

Excel.Application version-independent PROGID and the {00024500-0000-0000-C000-000000000046} CLSID. COM related registry entries for Excel 2000 include the following: HKEY_CLASSES_ROOT\Excel.Application\CLSID Default Value: {00024500-0000-0000-C000-000000000046} HKEY_CLASSES_ROOT\CLSID{00024500-0000-0000-C000-000000000046}\LocalServer32

Default Value: C:\PROGRA~1\MICROS~1\Office\EXCEL.EXE /automation By following the registry keys from the PROGID to the CLSID, COM can learn where the Excel executable file is installed and start it for Automation.

answered on Stack Overflow Dec 3, 2012 by ChiYoung
0

I faced a similar issue where the identity was lost in between the session and I had to give the credentials again to fix it temporarily. While investigating it, I came across an article that suggested granting the domain account that is used as identity with 'Logon as a Batch job' privilege as the identity would be lost when the AD performs an update if the privilege is not granted.

https://support.microsoft.com/en-za/help/312497/prb-com-application-under-domain-account-fails-intermittently

https://www.brooksnet.com/faq/granting-logon-as-batch-privilege

answered on Stack Overflow Mar 29, 2017 by JKay

User contributions licensed under CC BY-SA 3.0