简体   繁体   中英

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

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM