0

我正在我的一个 asp.net 应用程序中实现导出到 Excel 功能。我有两台服务器(QA 和 Development)。在开发服务器中它工作正常,但在 QA 服务器中我得到以下错误。

    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

我在两台服务器上都配置了相同的东西,但 QA 服务器仍然无法正常工作。接下来我该怎么办?任何想法...??

4

2 回答 2

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.

于 2012-12-03T11:45:55.880 回答
0

我遇到了一个类似的问题,即在会话之间丢失了身份,我不得不再次提供凭据以暂时修复它。在调查它时,我遇到了一篇文章,该文章建议授予用作具有“作为批处理作业登录”权限的身份的域帐户,因为如果未授予该权限,则当 AD 执行更新时该身份将丢失。

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

于 2017-03-29T12:15:21.050 回答