在C#.Net中将Windows Service迁移到Web Service [英] Migrate Windows Service to Web Service in C#.Net

查看:86
本文介绍了在C#.Net中将Windows Service迁移到Web Service的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已经在我的项目中使用C#.Net编码为通信目的编写了Windows Service.我使用Windows服务本身来更新更多功能.它也工作正常.目前,我们已经计划将服务包迁移,例如将Windows服务迁移到Web服务(或)将Windows服务迁移到WCF服务.

当我执行这些类型的迁移时,将Windows服务迁移到新服务以及在迁移到Web Service(或)WCF Service时是否要逐行再次编写代码有什么好处.


请给我一些指导.

谢谢
Santhya

Hi,

I have wrote Windows Service for communication purpose in my project, using C#.Net Coding. I make updating more features using windows service itself. It working fine too. At present, we have a plan to migrate the service package, like Migrate Windows service to Web service (or) Migrate Windows Service to WCF Service.

While i do these type of migration, what will be benefits of my windows service to new service as well as whether i want to write the code again line by line, while migrating into Web Service (or) WCF Service.


Kindly give me some guidance.

Thanks
Santhya

推荐答案

使用WCF和/或Web服务具有很大的优势.

WCF:
1)它允许您公开Web,TCP,MSMQ ctc的多个终结点.从您唯一的代码.
2)它为您提供了选择任何通信模式的极大灵活性.
3)具有很高的安全性.


Web服务:
1)它使用Open XML进行数据转换,这在所有语言中都是可以接受的.
2)创建简单.



如果您的应用程序在Dot Net中,则无需再次编写任何代码..... :)

将所有方法粘贴到Web Service/WCF中,并在其上应用适当的属性.像[WebMethod]/[OperationContract] ...您已经完成....


如果有帮助,请标记为答案...这很激励:)
there are great advantages of using WCF and/or Web Services.

WCF:
1) it allows you to expose multiple endpoints for Web, TCP, MSMQ ctc. from your only code.
2) it provides you with great flexibility of choosing any communication mode.
3) it is featured with high level security.


Web Service:
1) it uses Open XML for transformation of your data which is acceptable in all languages.
2) Simple to create.



if your application is in Dot Net, you don''t have to write any of your code again..... :)

paste all your methods in Web Service/WCF and apply appropriate Attributes over them. like [WebMethod]/[OperationContract]... you are done....


mark as answer if helps you.. it is motivating :)


这篇关于在C#.Net中将Windows Service迁移到Web Service的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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