RESTful API Server in C#

65,072

Solution 1

If you are using .NET Framework 4.5 you can use Web API

If you are using .NET Framework 3.5 I highly recommend ServiceStack

If you are using .NET Core then you can use ASP.NET Core Web API

Solution 2

Nancy is a free REST framework for C#.

Solution 3

If you are working in .NET 4.0 or higher and looking for a pre-existing REST server solution that you can plug into (which it sounds like you are), you might want to check out Grapevine. You can get it using NuGet, and the project wiki has lots of sample code.

I am the project author, and I had a similar need as the one you described. Using resources I found here and elsewhere, I built Grapevine so that I would have a solution in my back pocket whenever I needed it again (DRY).

Solution 4

If you are ok with using IIS to host your app, WebAPI is the route to go, per the above answers. Not every solution is best in IIS however.

For executable apps (such as a windows service), consider using WebServicesHost. This page is a good example of how to implement it.

Share:
65,072
BytesGuy
Author by

BytesGuy

Updated on February 10, 2020

Comments

  • BytesGuy
    BytesGuy over 4 years

    Are there any frameworks that allow a RESTful API Server to be written in C#?

    I have seen MVC 4, however this seems to be providing a view that you can see in the browser, I just require the API server and no view. It would be great if it was able to provide a streaming API too.

    Thanks