我有一个使用 COM 库的应用程序。当我在控制台应用程序中运行它进行测试时,它运行良好。但是当我使用 installutil 将它安装为 Windows 服务时。在日志中我有错误
Message: (SaveInvoice) - Zapisywanie faktury - FS/12584/2012/01
Nie znaleziono błedu o kodzie: Creating an instance of the COM component with CLSID {F8605331-7454-4A45-98DB-A69EBB3D2947} from the IClassFactory failed due to the following error: 8000ffff Katastrofalny błąd. (0x8000FFFF (E_UNEXPECTED)).
Stacktrace: SaveDocuments.SaveInputDocuments => SaveMethods.SaveInvoice => LogProvider.ErrorException
Exception:
System.Runtime.InteropServices.COMException (0x8000FFFF): Creating an instance of the COM component with CLSID {F8605331-7454-4A45-98DB-A69EBB3D2947} from the IClassFactory failed due to the following error: 8000ffff Katastrofalny błąd. (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)).
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, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at Rewizor.Application.Start.get_Gt()
at Rewizor.Application.Start.get_Rewizor()
at Rewizor.Parsers.Invoice.InvoiceParser.InvoiceParserVatDocument(CustEDIInvoice invoice)
at Rewizor.ModelRepository.Invoice.InvoiceRepository.CreateInvoice(CustEDIInvoice invoice)
at DALRewizor.RewizorRepository.CreateInvoice(CustEDIInvoice invoice)
at EDIService.BLL.RepositoryBLL.CreateInvoice(CustEDIInvoice invoice)
at BLL.InboxRepository.SaveMethods.SaveInvoice(EDI_OutputStorage item)
任何人都有想法,如何解决它?