I have implemented some web services in .net and hosted it on windows server, how I can port it to linux ? To have the same web services on linux machine, do I have to rewrite it in Java ? Any Ideas.
Asked
Active
Viewed 5,901 times
4
-
2The question is really to vague to answer intelligently. Q: Can you do web services in .Net? A: Yes, there are many, many ways. For starters, look at Mono: http://www.mono-project.com/Mono:Linux Q: Can I implement the *same* web service in a *different* language from C# and/or a *different* environment from Mono/.Net? A: Sure. Look at JWS: http://www.oracle.com/technetwork/java/index-jsp-137004.html. – paulsm4 Sep 25 '12 at 22:15
-
Thanks Paulsm,I have tried to rephrase it. – user476566 Sep 25 '12 at 22:25
-
Thanx: the rephrasing helped. Q: I wrote C# .net services in Windows. Can I port it directly to Linux? A: Yes: you should be able to recompile and run your .Net web app in Mono. The only "gotcha" might be Interop code. – paulsm4 Sep 25 '12 at 22:41
1 Answers
3
A very wide scope of question , so here is a general answer
If you have implemented the service in WCF then mono ( .net on Linux ) ha limited support for it. For all the known issues look at
http://www.mono-project.com/WCF_Development
I have done this before for simple services without much problem.
If you need to support web services on both windows and Linux ,then I can recomend an alternative to WCF
https://github.com/ServiceStack/ServiceStack
Use this to avoid porting effort. This way you won't have to rewrite in java and reuse some of you .net code.

NiladriBose
- 1,849
- 2
- 16
- 31