升级后,应用程序服务无法正常工作. [英] Application service not working after upgrade.

查看:98
本文介绍了升级后,应用程序服务无法正常工作.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1.我有一个使用C#服务与客户端通信的客户端服务器应用程序.使用单个TCP端口完成通信.
2.现在,我更新了此C#服务代码,以使用附加TCP 端口以更好地与客户端进行通信.
3.这项新的C#服务在全新安装中可以正常运行,但是在应用程序升级的情况下,该C#服务无法使用新端口进行通信.为了解决这个问题,我必须重新启动C#服务以在新端口上开始通信.我想知道这个问题是否与新端口添加到C#服务有关.
升级后如何在不重新启动任何服务的情况下启用c#服务以使用新端口开始通信.

在升级应用程序期间,我停止了服务,替换了exe,然后再次启动它,但这不能解决问题.完成应用程序升级后,我必须重新启动服务.

1. I have a client server application that uses C# service to communicate with clients. Communication is done using single TCP port.
2. Now I updated this C# service code to use an additional TCP port for better communication with clients.
3. This new C# service works smoothly on fresh installation but on application upgrade case this C# service does not communicate using the new port. To solve this problem I have to restart the C# service to start communication on new port.I wonder whether this issues is related the newly port added to C# service.
How can I enable c# service to start communication using new port after upgrade without any service restart.

During upgrading of application I stop the service replace the exe and start it again but this does not solve the problem. After complete upgradation of application I have to Restart the service.

推荐答案

可能是您的升级太快了.根据我在服务方面的经验,他们通常会报告已停止,但是实际上您需要稍等一会儿,然后才能更改有关该服务的任何内容.
例如,在命令脚本中,这将因为执行速度太快而失败:
Could be your upgrade is just too fast. In my experience with services, they often report to have stopped but actually you need to wait a little longer before you can change anything about the service.
For example, in a command script this will fail because execution is too fast:
sc stop MyService
... do something with the service
sc start MyService



目前尚不清楚如何进行升级,但这很容易成为问题.否则,请提供更多信息.

祝你好运!



It isn''t very clear how you do your upgrade but this could easily be the problem. Otherwise, please provide more info.

Good luck!


谢谢你们:)

我通过在升级后以3分钟的延迟重新启动服务来解决了该问题.

我还指出,升级此新服务后,将需要很长时间才能停止,有时我不得不终止服务过程,然后再次启动该服务.

但是在再次启动服务后,它将开始使用新端口进行通信并像黄油一样平稳工作....:P
Thank you guys :)

I solved the problem by restarting the service after upgrading with a delay of 3 mins after upgrade.

Also I noted that after upgrading this new service would take a long time to stop, sometimes I had to kill the service process and then start the service again.

But after starting service again it would start communicating using new port and work smooth as butter.... :P


这篇关于升级后,应用程序服务无法正常工作.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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