Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embedded C# web server? [closed]

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

Open source (FLOSS) would be preferred if possible.

*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.

like image 720
Iain Sproat Avatar asked Nov 24 '10 16:11

Iain Sproat


People also ask

What is embedded C used for?

Embedded C is generally used to develop microcontroller-based applications. C is a high-level programming language. Embedded C is just the extension variant of the C language. This programming language is hardware independent.

What is in embedded C?

Embedded C is an extension of C language and it is used to develop micro-controller based applications. The extensions in the Embedded C language from normal C Programming Language is the I/O Hardware Addressing, fixed-point arithmetic operations, accessing address spaces, etc.

Why it is called embedded C?

Every language is consisting of basic elements and grammatical rules. The C language programming is designed for function with variables, character set, data types, keywords, expression and so on are used for writing a C program. The extension in C language is known as embedded C programming language.


1 Answers

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

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

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

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.

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.

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

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!

and both Nancy and Kayak are MIT licensed.

like image 153
Iain Sproat Avatar answered Sep 28 '22 08:09

Iain Sproat