0

I am a C++ developer and want to develop a RESTful service. Since our business logic is in C++(boost) but want to like to develop server in C# due to easy deployment and enhancement.. My business logic is fetching data from Db and applying algorithms on it and producing output. Sometimes these output is a big array or matrix etc. Looking forward to know the integration of C++ and C# code here.

CrazyC
  • 1,840
  • 6
  • 39
  • 60
  • So what is stopping you from going ahead and writing a RESTful web service? I found a way in 2 seconds: http://www.codeproject.com/Articles/112470/Developing-a-REST-Web-Service-using-C-A-walkthroug Sharing your research helps everyone. Tell us what you found and why it didn’t meet your needs. This demonstrates that you’ve taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer:) Good Luck! – Jeremy Thompson Sep 02 '13 at 05:58
  • Its not a question how to develop the RESTful services but how to integrate the C# services with ++ code. – CrazyC Sep 02 '13 at 06:03
  • [Calling C++ from C#](https://www.google.com/search?source=ig&rlz=1G1ACGW_ENUS358&q=Calling+C%2B%2B+from+C%23&oq=Calling+C%2B%2B+from+C%23&gs_l=igoogle.3..0l2j0i22i30l8.831.3376.0.3695.19.14.0.3.3.1.164.1662.4j10.14.0...0.0...1ac.1.12.igoogle.VVzxQ5-4g-g) – Tim Sep 02 '13 at 06:09
  • You can also take a look at C++/CLI - here's a SO overflow answer that gives an example plus a link to a tutorial: http://stackoverflow.com/a/2211959/745969 – Tim Sep 02 '13 at 06:23
  • ASP.NET Web API + C++/CLI are probably your best bets to do the job. C++/CLI ain't pretty but it gets the job done without having to write a gnarly C interface to your code. – Cory Nelson Sep 02 '13 at 06:28
  • You can have a c++ backend server communicating with your service implementation in .NET i.e. via [0mq](http://zeromq.org/). Apart from that, have you googled [project casablanca](http://casablanca.codeplex.com/)? – Dmitry Ledentsov Sep 02 '13 at 06:39

1 Answers1

0

Another option is to expose your C++ library as COM+. This way your C# web-service can easily use the C++ library. For .NET - COM+ interoperability see: MSDN

sundog
  • 179
  • 6