.NET Compact Framework 3.5 支持 WCF 的子集

.NET Compact Framework 3.5 已经支持 Windows Communication Foundation (WCF)了,这是.NET CF 3.5 最让人兴奋的特性之一。不过,.NET CF 版的 WCF是.NET Framework 3.5 版 WCF 的功能子集。MSDN Library for Visual Studio 2008 Beta 2 (Development Tools and Languages|Visual Studio|.NET Framework Programming in Visual Studio|.NET Compact Framework|Application Development|Windows Communication Foundation (WCF) Development|Messaging in the .NET Compact Framework) 中是这样描述的:
The subset of Windows Communication Foundation (WCF) that is implemented in the .NET Compact Framework provides a unified programming model for building message-oriented applications. It enables developers to build secure messaging applications that work across platforms and that support interaction with existing WCF services on the desktop.
(译文:.NET 精简框架实现了 WCF 的子集,为构建面向消息的应用程序提供了统一的编程模型。这使得开发人员能够构建跨平台的安全的消息应用程序,并且支持跟现有的运行在桌面平台的 WCF 服务交互。)

WCF messaging layer on the .NET Compact Framework
.NET Compact Framework 3.5 支持 WCF 的子集

Support for the WS-Security version 1.0 specification includes SOAP message security using X.509 certificates. The Message class is built on the WS-Addressing standard.

MSDN Library for Visual Studio 2008 Beta 2 对 Compact WCF与 Desktop WCF 之间的差异描述得不够详尽,只是简单描述了一下架构和安全方面的不同。

今天发现有人整理了一个比较详细的表格,供大家参考:

Feature

Desktop WCF

Compact WCF

Bindings:
· BasicHttpBinding Yes Yes
· CustomBinding Yes Yes
· WindowsMobileMailBinding N/A Yes
· ExchangeWebServiceMailBinding Yes, via NetCF install Yes
Formatters:
· SoapFormatter Yes Yes
· BinaryFormatter Yes No
Encoders:
· TextMessageEncoder Yes Yes
· BinaryMessageEncodingBindingElement Yes No
· MTOMEncoder Yes No
· GzipEncoder Sample available Sample available
Transports:
· HttpTransportBindingElement Yes Yes
· HttpsTransportBindingElement Yes Yes
· MailTransportBindingElement Yes, via NetCF install Yes
· MsmqTransportBindingElement Yes No
· TcpTransportBindingElement Yes No
· (other transports) Yes No
XmlDictionaryReader/Writer Yes Yes; stub around XmlTextReader/Writer
DataContractSerializer Yes No; but can be wire-compatible with DCS via XmlSerializer
Service proxy generation Yes; via SvcUtil.exe Yes; via NetCFSvcUtil.exe, not integrated into VS2008
· Non-HTTP transports Yes No
· Custom headers Yes No
WS-Addressing Yes Yes
WS-Security message level security
· X.509 Yes Yes
· Username/password Yes No
· SecurityAlgorithmSuite.Basic256Rsa15 Yes Yes
· SecurityAlgorithmSuite.Basic256 Yes No
WS-ReliableMessaging Yes No
Patterns
· Service model Yes No
· Message layer programming Yes Yes
· Buffered messages Yes Yes
· Streaming messages Yes No
· Endpoint descriptions in .config files Yes No
Channel extensibility Yes Yes
Security channel extensibility Yes No

其中 Mail Binding 是很有意思的一个特性,我 以前的随笔有提过。不过这个功能需要跟 Exchange Server 配合使用,有一定的局限性。WCF Exchange Server Mail Transport 使用方法可以参考 MSDN 文档。

你可能感兴趣的:(windows,.net,Security,Exchange,WCF)