是否有可能创建一个独立的,C#的Web服务部署为一个EXE或Windows服务? [英] Is it possible to create a standalone, C# web service deployed as an EXE or Windows service?

查看:170
本文介绍了是否有可能创建一个独立的,C#的Web服务部署为一个EXE或Windows服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能创建一个C#的EXE或Windows服务可以处理Web服务请求?显然,某种嵌入,可能有限,web服务器将必须将EXE /服务的一部分。该EXE /服务将不必依赖于安装IIS。优选地,嵌入式Web服务可以处理HTTPS / SSL连接类型

Is it possible to create a C# EXE or Windows Service that can process Web Service requests? Obviously, some sort of embedded, probably limited, web server would have to be part of the EXE/service. The EXE/service would not have to rely on IIS being installed. Preferably, the embedded web service could handle HTTPS/SSL type connections.

场景是这样的:客户希望在他们公司的计算机上安装一个小代理(窗口服务) 。代理将有两个主要任务:1)监控系统随着时间的推移和收集数据的某些部分; 2)Web服务请求响应(SOAP -V-其余部分仍然可以讨价还价约)进行数据采集和系统变革的目的。客户喜欢的web服务API的想法,这样任何数目的客户端(在任何语言)可以写成打入对企业机上运行的各种试剂。他们希望安装相对无痛(安装.NET,一些组件,服务,修改Windows防火墙,启动服务),而无需安装和配置IIS。

The scenario is this: customer wants to install a small agent (a windows service) on their corporate machines. The agent would have two primary tasks: 1) monitor the system over time and gather certain pieces of data and 2) respond to web service requests (SOAP -v- REST is still be haggled about) for data gathering or system change purposes. The customer likes the idea of web service APIs so that any number of clients (in any language) can be written to tap into the various agents running on the corporate machines. They want the installation to be relatively painless (install .NET, some assemblies, a service, modify the Windows firewall, start the service) without requiring IIS to be installed and configured.

我知道我可以用Delphi做到这一点。但客户宁愿在C#如果可能的话这件事。

I know that I can do this with Delphi. But the customer would prefer to have this done in C# if possible.

有什么建议?

推荐答案

是的,这是可能的,你可能想看看 WCF 自托管

Yes, it's possible, you may want to have a look at WCF and Self Hosting.

这篇关于是否有可能创建一个独立的,C#的Web服务部署为一个EXE或Windows服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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