【问题标题】:Error 1053: The service did not respond to the start or control request in a timely fashion, when intalled and ran a WCF service错误 1053:安装并运行 WCF 服务时,服务未及时响应启动或控制请求
【发布时间】:2022-01-17 14:42:54
【问题描述】:

我正在尝试使用下面这个批处理文件安装 WCF 服务,该服务安装成功,但运行时抛出错误 1053

我试过了, - 在注册表编辑器中添加 ServicePipeTimeout DWord, - 使用 sfc /scannow 命令检查系统文件损坏, -重置网络缓存和配置, - 获得应用程序的所有权, - 使用发布版本而不是调试。

以上解决方案均未解决该错误

这是我在批处理文件中使用的代码

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

我还能做些什么来解决这个错误吗?

【问题讨论】:

标签: c# .net wcf


【解决方案1】:

看起来服务代码的开头可能有一些异常。尝试在开头添加更多日志以查看执行到达的位置。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-12-20
    • 2014-07-02
    • 1970-01-01
    • 1970-01-01
    • 2011-03-28
    • 2014-08-05
    • 2011-01-05
    相关资源
    最近更新 更多