Windows Server 2003 R2和Windows服务 [英] windows server 2003 R2 and windows service

查看:116
本文介绍了Windows Server 2003 R2和Windows服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

当我尝试启动Windows Service 2003 R2时,总是在收到超时消息时,我已经在Windows Server 2003 R2上安装了Windows Service.

我们已经在Windows Server 2003 SP1和Windows XP上安装了相同的实例,但是我们没有遇到这个问题.

即使我尝试与Windows Server 2003 R2上的服务的兼容性属性,但没有用.它在日志文件和事件查看器中都具有日志记录功能,但是在那里没有任何记录.

有人可以告诉我启动服务所需的任何特殊权限吗?
请提供一些解决方案.

感谢您的帮助.

Hello

I have installed the windows service on windows server 2003 R2 when i try to start it always i am getting timeout message.

same instance we have installed on windows server 2003 SP1 and windows xp but we didnt face this problem.

even i tried with the compatibility propertie of the service on windows server 2003 R2 but no use. It is having logging feature in both log file as well as event viewer but nothing is logged there.

can any one tell me any special permission required to start the service?
please provide some solution.

Appreciate your help.

推荐答案

启动服务不是权限问题.

这完全取决于服务的编写方式.如果OnStart事件中的代码未在30秒内将控制权返回给服务管理器,则会发生此超时错误.

在OnStart事件中,您通常会启动一个线程来执行该服务应该执行的工作.如果将工作代码放入OnStart事件中,则需要进行一些重写才能解决此问题.
It''s not a permissions problem starting the service.

This depends entirely on how the service was written. If your code in the OnStart event doesn''t return control to the service manager within 30 seconds, this timeout error will occur.

In the OnStart event, you would normally kick off a thread that executes the work the service is supposed to perform. If you put your work code in the OnStart event, you''ve got some rewriting to do to fix this.


这篇关于Windows Server 2003 R2和Windows服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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