如何解决这个错误...? [英] How to resovel this Error...?

查看:115
本文介绍了如何解决这个错误...?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了Windows服务,它使用了一些像这样的外部dll

1)MSCOMM32.OCX
2)MSWINSCK.OCX
3)Interop.MSWinsockLib.dll
4)Interop.MSCommLib.dll
5)Interop.BFSDK660.dll

我还在服务中添加了服务安装程序类,并且还在安装程序类中将服务帐户设置为网络服务.

服务构建成功.

然后,我向服务添加另一个项目,它是此服务的设置和部署项目.

我在此设置项目中添加项目输出.
然后从视图"中添加自定义操作",然后在其中添加主输出".

之后,将构建Steup项目,并获取.msi和.exe文件进行服务.

成功安装了.exe文件.

我的服务也列在services.msc中.


但是我的问题是,安装后,当我启动服务时会收到此错误


Windows无法在本地计算机上启动MyService服务.
错误1053:服务未及时响应启动或控制请求.

在事件日志查看器中,我发现了此错误日志

由于以下错误,检索具有CLSID {2F592C51-83DA-498C-9B3B-CA1C2E0D5DD7}的组件的COM类工厂失败:800700c1.


请帮帮我... !!!

谢谢..

I have develop a windows service, it is used some external dll like this

1) MSCOMM32.OCX
2) MSWINSCK.OCX
3) Interop.MSWinsockLib.dll
4) Interop.MSCommLib.dll
5) Interop.BFSDK660.dll

I have also added service installer class to the service and also set the service account to network service in installer class.

Service is Build successfully.

Then i add another project to service it is setup and deployment project for this service.

I Add Project Out Put in this setup Project.
Then From View i add Custom Action and there i add Primary Output.

After this, the steup project is build and got .msi and .exe files for service.

Installed .exe file sucessfully.

My Service is also listed in services.msc.


But my Proble is that after installtion, when i start the service i will receive this error


Windows could not start the MyService service on Local Computer.
Error 1053: The service did not respond to the start or control request in a timely fashion.

and in event log viewer i found this error log

Retrieving the COM class factory for component with CLSID {2F592C51-83DA-498C-9B3B-CA1C2E0D5DD7} failed due to the following error: 800700c1.


Please Help me...!!!

Thank You..

推荐答案

确保这些外部dll可用并已在客户端计算机上注册.
Make sure these external dll''s are available and registered on your client machine.


1053表示您的OnStart崩溃是因为您没有正确返回它.我建议您尝试捕获所有异常,并且不要以为您对事件日志的写操作确实有效.服务确实需要一个良好的Trace.WriteLine以及一个TraceListener到日志文件,这样您才能真正看到代码的路径以及正在发生的事情.
1053 implies that your OnStart is crashing because you did not return from it properly. I suggest you try to catch all exceptions, and don''t assume that your writes to the event log are actually working. Services really need a good Trace.WriteLine with a TraceListener to a log file so you can really see the path of the code and what''s going on.


我明白了.
在开发软件包之前,每次都需要注册一个dll
现在解决了
I Got My Ans..
It will need a registering a dll each and every time before a package is developed
now it is solved


这篇关于如何解决这个错误...?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆