I created a simple REST Service using the WCF REST Template 40(CS) which is working just fine. There only is a problem that the response uses \"application/json\" as content typ
If you want to return an arbitrary content from a WCF REST service, you need to use the Raw programming model - http://blogs.msdn.com/b/carlosfigueira/archive/2008/04/17/wcf-raw-programming-model-web.aspx. The template you used defines the endpoint using the service route, so it's all set up for you. Now you need to define the operation returning a Stream
parameter, and set the appropriate content type in the operation: WebOperationContext.Current.OutgoingResponse.ContentType = "text/plain";