简体   繁体   中英

Changing connection string of windows service while installing with setup installer

I have two projects in my solution. One is an application. The other is a Windows service. I created a setup installer and added the primary output of these two projects to the installer. My setup installer asks for a data source while installing the application and the Windows service. After inputting the SQL server name the both application and the Windows service will be installed on the system. I am able to open and use the application with the changed connection string, but when I check the Windows service status it is not in a running state. When I try to start the Windows service manually I get

error 1053: the service did not respond to the start or control request into timely fashion".

Any help is much appreciated.

您可能可以在事件查看器中找到一些线索。

您要更改正确的配置文件吗?对于Windows服务,配置文件必须位于.exe文件的同一文件夹中,并且必须具有相同的名称,例如MyService.exe和MyService.config

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