WCF 与 .NET 2.0
我们需要在只能运行.NET 2.0的机器上实现WCF服务。
该机器是Windows XPe POS终端,我们还没有找到安装.NET 3.0的方法。我们无法真正使用新的 XPe 映像对其进行格式化,因为安装了专有的 POS 应用程序和驱动程序。
有没有办法在.NET 2.0上实现WCF服务?我们可以像 .NET CF 那样使用标准 XmlSerializer 来处理消息,但是 .NET CF不支持成为服务器...
替代解决方案是以某种方式安装.NET 3.0。安装程序抱怨 Windows XP SP2 未安装,并且 Windows Update 无法运行XPe。
有什么想法吗?
更新:我们还希望可以选择使用 SOAP Web 服务,但我们的目标平台不支持已安装 IIS。有谁知道在没有 IIS 的情况下托管 .NET 2.0 Web 服务的好(生产质量)方法吗?
解决方案:我们将 Cassini 与 .NET 2.0 Web 服务结合使用,作为建议的标记答案。到目前为止,这似乎运作良好。感谢您的帮助。
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 have not found a way to install .NET 3.0. We can't really format it with a new XPe image because there is a proprietary POS application and drivers installed.
Is there a way to do implement a WCF service on .NET 2.0? We can use the standard XmlSerializer for the messages as .NET CF does, but .NET CF doesn't support being a server...
An alternate solution is to somehow install .NET 3.0. The setup complains about Windows XP SP2 not being installed, and Windows Update doesn't work on XPe.
Any ideas?
UPDATE: We would also like the option to use SOAP web services, but our target platform does not have IIS installed. Does anyone know a good (production quality) way to host a .NET 2.0 web service without IIS?
SOLUTION: We are using Cassini with .NET 2.0 web services as the marked answer suggested. This seems to be working well thus far. Thanks for the help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
听起来你已经用尽了大部分可能性。您是否有任何理由必须使用 WCF 而不是 .NET 2.0 支持的开箱即用的普通 SOAP Web 服务?虽然我知道使用旧技术令人沮丧,但我怀疑,与在 .NET 2.0 上拼凑出 WCF 实现相比,沿着相对主流的道路走下去会遇到更少的问题。
(我强烈建议反对尝试在 .NET 2.0 上使用 .NET 3.0 程序集。它很可能违反许可证 - 您必须检查 - 但它也可能以微妙的方式破坏,从而导致毕竟,谁确切知道 .NET 3.0 安装程序在做什么?您想追踪它可能得到的每个注册表项吗?放弃它,但我认为这是一个坏主意。)
It sounds like you've exhausted most of the possibilities. Is there any reason you have to use WCF instead of the plain SOAP web services that .NET 2.0 supports out of the box? While I understand it's frustrating to use the older technology, I suspect you'll have fewer problems by going down the relatively mainstream path than somehow cobbling together a WCF implementation on .NET 2.0.
(I would strongly recommend against trying to use the .NET 3.0 assemblies on .NET 2.0. It may well violate the licence - you'd have to check - but it could also break in subtle ways that would be very hard to debug. After all, who knows exactly what the .NET 3.0 installer is doing? Do you want to chase down every registry key it writes? You may get away with it, but I think it's a bad idea.)
我可以想到两种可能性:
这里描述了这些工具之一:http://www.remotesoft.com/linker/linker_faq。 .NET 3.0主要
I can think of two possibilities:
One of these tools is described here: http://www.remotesoft.com/linker/linker_faq.html
不能在中间放一个“代理”吗?因此,您的 POS 使用 SOAP/ASMX 与代理通信,然后代理与 WCF 服务通信。
我同意,尝试将 .net 3.0 DLL“破解”到 .net 2.0 系统听起来像是一个痛苦的世界。
Can't you put a "Proxy" in between? So your POS talks to the Proxy using SOAP/ASMX and the Proxy then talks to the WCF Service.
I agree, trying to "hack" .net 3.0 DLLs into a .net 2.0 system sounds like a world of pain.
答案是否定的。您无法在 2.0 系统上安装或以某种方式使用 WCF
您的选项是:
The answer is no. You cannot install or somehow use WCF on a 2.0 system
Your options are: