ASP.NET MVC 4 application to Call Windows Service

扶醉桌前 提交于 2019-12-11 13:23:09

问题


We are using distributed architecture for our project. In which UI layer is reside on one server and Business Layer on another server. We are creating Windows service of Business layer. Is it possible to call the windows service from another server UI application. How to do it?


回答1:


There are a couple of options for communicating with a windows service.

  1. A service bus
  2. In Proc hosted WebAPI
  3. Self hosted WCF Service
  4. SignalR to message between client and server



回答2:


You could create a self hosted wcf service inside of your windows service. Check this similar question and answer for more information: Can I host (self host) a WCF Service in a Windows Service and expose it via http?



来源:https://stackoverflow.com/questions/15247529/asp-net-mvc-4-application-to-call-windows-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!