Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF Service on Linux with Apache2

Tags:

linux

wcf

mono

I've went through several examples (shown below) based on the hopes that I could get WCF to work on the 4.0 framework in Mono.

  • Installing a Mono-Server for WCF
  • Indigo Infocard

However, the link on http://www.mono-project.com/WCF didn't seem to contain a "guide" so to speak as to "here's how to setup wcf on linux with mono". On a side note. I think I've checked the first two pages of google for most wcf/mono keyword combinations to no avail.

Is it possible to easily get a WCF service up and going on linux? I presume there may be some configuration on the apache2 side? (I'm running a lamp server with Ubuntu 11.10).

I took the stock 4.0 WCF Service Library and tested deploying it to my server and accessing the *.svc to see if I got the wsdl, however, I did get a status code of 500.

As far as alternatives. I'm thinking that http://www.servicestack.net/ is probably the best?

So there are a couple of questions:

  1. Can you get WCF to work on Linux easily? If so, how? (Windows was easily done)
  2. SOA Alternatives. Should I look at asmx (wcf did replace this) or go with Service Stack.

My goal (in a basic sense) is to pass data to a service and have it compute work. Nothing is returned.

like image 946
Brent Avatar asked Nov 13 '22 11:11

Brent


1 Answers

servicestack.net itself (and all the live examples) runs on an Ubuntu 12.04 on a Hetzner vServer. All our live demos run on Nginx/MonoFastCgi.

Here is how to run a ServiceStack self-hosted service inside a Linux daemon which also includes configuration of hosting it behind an Apache or Nginx reverse proxy. This post was written by a team who moved to ServiceStack to fix their memory and performance issues with MVC on Mono.

I generally avoid trying to run any heavy Microsoft web frameworks on Mono unless the Mono team has expressed supported configuration. For WCF they've stated only the "Silverlight subset" of WCF is supported.

Microsoft themselves don't support or test on Linux so you will generally have a better experience with others that do.

I've also answered what I believe are the main differences between ServiceStack, WebApi and WCF in an earlier question here.

like image 79
mythz Avatar answered Nov 16 '22 00:11

mythz