WCF with .NET 2.0

We need to implement a WCF service on a machine that can only run .NET 2.0.

The machine is a Windows XPe POS terminal and we haven't found a way to install .NET 3.0. We cannot format it with the new XPe image because there is a native POS application and drivers installed.

Is there a way to implement a WCF service in .NET 2.0? We can use the standard XmlSerializer for messages like .NET CF , but .NET CF doesn't support the server ...

An alternative solution is to install .NET 3.0 somehow. Installations complain about Windows XP not having SP2 installed and Windows Update not working on XPe.

Any ideas?

UPDATE: We would also like to use SOAP web services, but our target framework does not have IIS . Does anyone know a good (product quality) for hosting a .NET 2.0 web service without IIS?

SOLUTION: We are using Cassini with .NET 2.0 web services as the suggested tagged answer. It has worked well so far. Thanks for the help.

+2


source to share


4 answers


It looks like you have exhausted most of the possibilities. Is there a reason why you need to use WCF instead of the regular SOAP web services that .NET 2.0 supports out of the box? While I understand that it is frustrating to use older technology, I suspect that you will have fewer problems going down the relatively mainstream path than somehow merging the WCF implementation into .NET 2.0.



(I would highly recommend not trying .NET 3.0 assemblies on .NET 2.0. This can greatly violate the license - you will need to check - but it can also break in subtle ways that would be very difficult to debug. After all, who knows exactly what the .NET 3.0 installer does? Want to chase every registry key it writes? You can get away with it, but I think this is a bad idea.)

+5


source


I can imagine two possibilities:



  • Try using one of the systems that bundles many of the DLLs your application uses into one exe. One of these tools is described here: http://www.remotesoft.com/linker/linker_faq.html
  • .NET 3.0 is basically a few new DLLs (WPF, WCF, and WF) added in .NET 2.0. You may be able to just copy the appropriate DLLs along with your application. (Some people think this is a dangerous idea, but you won't know until you try.)
+2


source


Can't you put a "proxy" in between? So your POS is talking to the proxy using SOAP / ASMX and the proxy, then talking to the WCF service.

I agree trying to "hack" .net 3.0. DLL to .net 2.0 system sounds like a world of pain.

+1


source


The answer is no. You cannot install or use WCF in any way on system 2.0.

Your options:

  • WCF is built to work with all WS- * standards. You can use Web Services Enhancements (WSE) 3.0 or hand-code your own class using remote .net classes.
  • You can watch Mono Olive. This is intended to be open source WCF replication.
0


source







All Articles