What's New in WCF 4.5

2,777 views
2,588 views

Published on

Windows Communication Foundation (WCF) is one of the leading technologies for building distributed applications. WCF 4.5 which ships with the new .NET 4.5 and Visual Studio 2012 introduces many new features that both simplifies the way we create services and enables us improve the way our services work. In this session we will see many of the new features offered by WCF 4.5 – configuration Intellisense, cleaner configuration for IIS, UDP and WebSockets supports, and many more.

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,777
On SlideShare
0
From Embeds
0
Number of Embeds
15
Actions
Shares
0
Downloads
89
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

What's New in WCF 4.5

  1. 1. This presentation: http://sdrv.ms/1b94Zmb What’s New in WCF 4.5 Ido Flatow, Senior Architect Sela Group
  2. 2. About Me • Senior architect, Sela Group • Co-author of: – Developing Windows Azure and Web Services – Microsoft official course – WCF 4 – Microsoft official course – Pro .NET Performance – Apress • Microsoft MVP • Focus on server, services, and cloud technologies • Manager of the Israeli Web Developers User Group
  3. 3. What is WCF? • WCF is a unified .NET framework for building service-oriented applications • WCF was introduced in .NET Framework 3.0 and extended in .NET 3.5, .NET 4, and .NET 4.5 • WCF is the foundation for other Microsoft distributed technologies Join the conversation on Twitter: @SoftArchConf #SoftArchConf
  4. 4. Do You Like WCF? Join the conversation on Twitter: @SoftArchConf #SoftArchConf
  5. 5. Common WCF Configuration Issues • • • • Using wrong service / contract names Need to remember binding names Copy & pasting configuration names Configuration duplication for WCF and IIS Image: chanpipat / FreeDigitalPhotos.net • Some configuration issues were addressed in WCF 4 • Visual Studio 2012 & WCF 4.5 continue the simplification process Join the conversation on Twitter: @SoftArchConf #SoftArchConf
  6. 6. Visual Studio 2012 Editor Simplification • IntelliSense – Service name – Contract name – Binding type Join the conversation on Twitter: @SoftArchConf #SoftArchConf
  7. 7. Visual Studio 2012 Editor Simplification • IntelliSense – – – – – Service name Contract name Binding type Binding configuration Behavior configuration Join the conversation on Twitter: @SoftArchConf #SoftArchConf
  8. 8. Visual Studio 2012 Editor Simplification • IntelliSense – – – – – Service name Contract name Binding type Binding configuration Behavior configuration • Tooltips • Compile-time validations Join the conversation on Twitter: @SoftArchConf #SoftArchConf
  9. 9. Cleaner Endpoint Configuration for IIS • Multiple IIS authentication types in one binding – Bindings can inherit authentication types from IIS – Instead of multiple endpoints, declare just one! – Set the binding’s clientCredentialType to InheritedFromHost • New default endpoint for HTTPS – No need to declare endpoints if using both HTTP and HTTPS – Default HTTPS endpoints don’t require client credentials – Customize default endpoints in the ProtocolMapping section Join the conversation on Twitter: @SoftArchConf #SoftArchConf
  10. 10. What Other Mess Got Cleaned Up? Join the conversation on Twitter: @SoftArchConf #SoftArchConf
  11. 11. Excessive Client Configuration Simplified Generated Configuration Join the conversation on Twitter: @SoftArchConf #SoftArchConf
  12. 12. DEMO SIMPLIFYING WCF
  13. 13. Duplex Communication with HTTP • HTTP is a request-response protocol • Updates are through server polling – Periodic polling (Anything new?) – Long polling (I’m waiting for you!) • Many disadvantages – Periodic polling inflicts high-latency on updates – Long polling is hard to implement – Can cause bandwidth overhead if used improperly Join the conversation on Twitter: @SoftArchConf #SoftArchConf
  14. 14. WebSockets in a Glance • • • • • • • Bi-directional TCP channel (full-duplex) Supports both HTTP and HTTPS (SSL) Accessible through JavaScript API Supports cross-domain calls Client-side - IE10, Chrome, Firefox, WCF 4.5 Server-side – IIS 8, ASP.NET 4.5, WCF 4.5 Standardization is still in progress!! Join the conversation on Twitter: @SoftArchConf #SoftArchConf
  15. 15. WebSockets and WCF 4.5 • WCF 4.5 supports WebSockets in two modes: – SOAP over WebSockets (.NET) – Plain text over WebSockets (browsers) • For SOAP use NetHttpBinding • For browsers, use the Microsoft.WebSockets NuGet package – Create a service class by inheriting from WebSocketService – Implement control methods – OnOpen, OnStop, OnMessage, OnError – Send messages to client by calling the Send method Join the conversation on Twitter: @SoftArchConf #SoftArchConf
  16. 16. DEMO DUPLEX WCF WITH WEBSOCKETS
  17. 17. WCF and UDP – Q&A • WCF 3.5 – “Does WCF support UDP bindings?” – “Not out-of-the-box, but there is an MS sample for that” • WCF 4 – – – – “Does WCF support UDP?” “Not out-of-the-box, but there is an MS sample for that” “But Discovery uses UDP, right?” “Indeed, but the UDP transport channel is internally used” • WCF 4.5 – “Does WCF support UDP?” – “YES!!” Join the conversation on Twitter: @SoftArchConf #SoftArchConf
  18. 18. UDP Transport • • • • New UDP binding out-of-the-box Supports one-way and request-response Unicast – you do not get an exception if host is down!! Multicast messaging is supported through IPs such as 224.0.0.1 – 239.255.255.255 • Supported features are basic – – – – Only text encoding No sessions No security No duplex Join the conversation on Twitter: @SoftArchConf #SoftArchConf
  19. 19. DEMO COMPARING HTTP, TCP, AND UDP
  20. 20. Improved Channels and Encoding • Web hosting (IIS) – Fixed streamed messages from being buffered in ASP.NET – Added async streamed reply for slow reading clients • Self hosting – Support for binary encoding compression (Gzip / Deflate) – Works with TCP and custom HTTP transports • Both hosting environment – New transport defaults for TCP and named pipe transports – Defaults are now multiplied by #cores to enable high-density scenarios Join the conversation on Twitter: @SoftArchConf #SoftArchConf
  21. 21. DEMO TRANSPORT IMPROVEMENTS
  22. 22. To Conclude • Yet another effort to simplify the creation of WCF services and clients • Continuing to support new and existing standards • Striving to improve the overall performance of WCF Join the conversation on Twitter: @SoftArchConf #SoftArchConf
  23. 23. WCF Resources WCF Home and Forum msdn.microsoft.com/en-us/library/dd456779.aspx social.msdn.microsoft.com/forums/en/wcf WCF Blogs blogs.msdn.com/b/piyushjo blogs.msdn.com/b/carlosfigueira WCF vNext UserVoice tinyurl.com/wcfvnext My Info blogs.microsoft.co.il/blogs/idof idof@sela.co.il @idoFlatow This presentation: sdrv.ms/1b94Zmb

×