[英]Error 1053: The service did not respond to the start or control request in a timely fashion, when intalled and ran a WCF service
I am trying to install a WCF service using this batch file below, the service is installed successfully, but threw the Error 1053 when ran我正在尝试使用下面的此批处理文件安装 WCF 服务,该服务安装成功,但运行时抛出错误 1053
I've tried, -Adding a ServicePipeTimeout DWord in the registry editor, -Checking for System File Corruptions using sfc /scannow command, -Resetting Network Cache and Configurations, -Getting Ownership of the Application, -Using Release Build instead of debug.我已经尝试过, - 在注册表编辑器中添加 ServicePipeTimeout DWord, - 使用 sfc /scannow 命令检查系统文件损坏, - 重置网络缓存和配置, - 获取应用程序的所有权, - 使用发布版本而不是调试。
none of the above solutions resolved the error以上解决方案均未解决错误
This is the code I am using in the batch file这是我在批处理文件中使用的代码
ECHO USAGE:
ECHO %0 [option]
ECHO r (or R) to have services installed from "Release" path. Release will also be added to service names. It will install services from debug path if nothing is specified.
ECHO.
ECHO.
SET Mode=Debug
IF "%1"=="R" (SET Mode=Release)
IF "%1"=="r" (SET Mode=Release)
SET serviceUserName=user1
SET password=password
SET net4Path=%CD%
ECHO Installing Xignite Service
SET servicePath="%~dp0\path\to\ServiceHost.exe"
SET serviceName=ServiceHostSvc
SC create %serviceName% binPath= %servicePath% DisplayName= "Service1-"%Mode%
SC description %serviceName% "Description here."
SC CONFIG %serviceName% obj= %serviceUserName% password= %password% type= own
ECHO Service1 Installed
ECHO.
SC START %serviceName%
pause
Is there anything else can i do to resolve the error?我还能做些什么来解决错误吗?
Looks like there could be some exception in the beginning of the service code.看起来服务代码的开头可能有一些异常。 Try to add more logs in the beginning to see till where the execution is reaching.尝试在开始时添加更多日志以查看执行到达的位置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.