嵌入式C#Web服务器? [英] Embedded C# web server?

查看:570
本文介绍了嵌入式C#Web服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Java的我已经能够嵌入*的码头服务器在我的应用程序,但有一个相当于嵌入式*服务器技术用于.NET?

In Java I've been able to embed* the jetty server in my apps, but is there an equivalent embedded* server technology for .Net?

开源(FLOSS)是preferred如果可能的话。

Open source (FLOSS) would be preferred if possible.

*嵌入式我的意思是一个轻量级的Web服务器应用程序,可以打包我的应用程序,并运行在用户的本地台式机上以本地提供网络服务。

*by embedded I mean a lightweight web server app that could be packaged with my application and run on a user's local desktop machine to provide a web service locally.

推荐答案

最接近相当于码头我发现到目前为止是南希,描述为:

The closest equivalent to Jetty I've found so far is Nancy, described as:

重量轻,低仪式,框架上的.NET和Mono构建基于HTTP的服务。

a lightweight, low-ceremony, framework for building HTTP based services on .Net and Mono.

南希是专门用来处理DELETE,GET,HEAD,OPTIONS,POST,PUT和PATCH请求

Nancy is designed to handle DELETE, GET, HEAD, OPTIONS, POST, PUT and PATCH requests

南希被设计成不会对现有框架的任何相关性。内置与.NET Framework客户端配置文件,南希可以用pretty的多少,无论你想要的,因为它是完全自包含有它自己的请求和响应的对象。

Nancy was designed to not have any dependencies on existing frameworks. Built with the .NET framework client profile, Nancy can be used pretty much wherever you want to, since it’s completely self contained with it’s own request and response objects.

之一,在南希的核心概念是主机。主机充当托管环境和南希适配器,从而使南希在现有的技术,如ASP.NET,WCF和OWIN,或集成在任何给定的应用程序。

One of the core concepts in Nancy is hosts. A host acts as an adaptor for a hosting environment and Nancy, thus enabling Nancy to run on existing technologies such as ASP.NET, WCF and OWIN, or integrated in any given application.

这是更轻便的选择是皮艇更新:项目看起来死亡作为2014年1月18号),其中它的文档描述为:

An even more lightweight option is Kayak (Update: project looks dead as of 2014-01-18), which its documentation describes as:

一个简单的Web服务器。它用于监听连接,创建请求的内存重新presentation,并允许您轻松地生成响应。它可以在任何C#程序中使用。您的code加载独木舟到其进程空间中,而不是其他的方式!

a simple web server. It listens for connections, creates an in-memory representation of requests, and allows you to easily generate responses. It can be used in any C# program. Your code loads Kayak into its process space—not the other way around!

和两个南希和皮划艇是MIT许可。

and both Nancy and Kayak are MIT licensed.

这篇关于嵌入式C#Web服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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