SlideShare a Scribd company logo
WCF Tips and Tricks
Advanced WCF
Components
Contract
Behavior
Endpoint
Streaming
• When to use:
– Data is too big and the transfer needs to be buffered
– Data should be processed by chunks
• Limitations:
– Supported not in all bindings
– Streaming methods can have only one parameter
– Session is not supported when streaming data
Streaming alternatives?
DIY! (do it yourself)
You can create several methods that will return data in chunks.
Message Contracts
• When to use:
– You need full control of SOAP messages
– You want to pass additional information with
response (like security, etc.)
– You want to add additional information with
request, but don’t want to mess the interface for
compatibility purposes
– Useful together with streaming option
Duplex Contracts
sd Use Case Model
WCF Client WCF Service
GetData()
getcallbackchannel()
CallDuplexMethod()
• When to use:
– You need to define two-way communication
between client and server
– You need to notify client about some event
• Limitations:
– Duplex behavior is working only within a client
session
Create WCF client in code.
• Why?
– More control over client proxy
– Want to track changes to the WCF client
implementation
• How?
– Use of ClientBase
– ChannelFactory
Service Discovery
• Announcement endpoints
– Useful to notify other clients
about service start/stop
• Metadata exchange (mex)
– Defines endpoint which provides
information about service
interface
• WS-Discovery
– Enables service discovery on the
network
Questions
Thanks
Useful links:
• Service discovery: http://msdn.microsoft.com/en-
us/library/dd456791%28v=vs.110%29.aspx
• ClientBase: http://msdn.microsoft.com/ru-
ru/library/ms576141%28v=vs.110%29.aspx
• ChannelFactory: http://msdn.microsoft.com/ru-
ru/library/ms734681%28v=vs.110%29.aspx
• Duplex services: http://msdn.microsoft.com/ru-
ru/library/ms731064%28v=vs.110%29.aspx
• Message contract: http://msdn.microsoft.com/ru-
ru/library/ms730255%28v=vs.110%29.aspx
• Streaming: http://msdn.microsoft.com/en-
us/library/ms733742%28v=vs.110%29.aspx

More Related Content

PPT
How to push data to a browser
PDF
Metrics driven development with dedicated Observability Team
PPTX
Introduction to Windows Azure Service Bus Relay Service
PDF
Server Monitoring (Scaling while bootstrapped)
PDF
Building and Scaling a WebSockets Pubsub System
PPTX
VMware Monitoring-Discover And Monitor Your Virtual Environment
PPT
Getting started with ASPNET Core SignalR
PPTX
Mciro Services & Zookeeper
How to push data to a browser
Metrics driven development with dedicated Observability Team
Introduction to Windows Azure Service Bus Relay Service
Server Monitoring (Scaling while bootstrapped)
Building and Scaling a WebSockets Pubsub System
VMware Monitoring-Discover And Monitor Your Virtual Environment
Getting started with ASPNET Core SignalR
Mciro Services & Zookeeper

What's hot (20)

PPTX
Best Features of Azure Service Bus
PDF
Rigadevdays - Communication in a microservice architecture
PPTX
Event Driven Architectures with Apache Kafka
PDF
Single Page Apps
PPTX
SOAP Monitoring
PDF
GemStone/S @ Vienna University
PPTX
Real User Monitoring (RUM)
PPTX
End user-experience monitoring
PDF
Advanced LB
PPTX
Modifying and Extending the ESB Toolkit
PDF
Jive the renovation of Aswing
PPTX
[Webinar] AWS Monitoring with Site24x7
PPTX
[Webinar] End User Experience Monitoring with Site24x7
PDF
Siyapath: P2P Gossip Based Volunteer Computing Framework
PPT
PPTX
Building large scalable mission critical business applications on the web
PDF
Monitoring CDN Performance
PDF
Supporting large scale React applications
PDF
Using Dockers for DB Monitoring
PDF
ZaloPay Merchant Platform on K8S on-premise
Best Features of Azure Service Bus
Rigadevdays - Communication in a microservice architecture
Event Driven Architectures with Apache Kafka
Single Page Apps
SOAP Monitoring
GemStone/S @ Vienna University
Real User Monitoring (RUM)
End user-experience monitoring
Advanced LB
Modifying and Extending the ESB Toolkit
Jive the renovation of Aswing
[Webinar] AWS Monitoring with Site24x7
[Webinar] End User Experience Monitoring with Site24x7
Siyapath: P2P Gossip Based Volunteer Computing Framework
Building large scalable mission critical business applications on the web
Monitoring CDN Performance
Supporting large scale React applications
Using Dockers for DB Monitoring
ZaloPay Merchant Platform on K8S on-premise
Ad

Viewers also liked (10)

PPS
Wcf Transaction Handling
PPTX
Wcf for the web developer
PPTX
WCF (Windows Communication Foundation)
PPT
WCF 4.0
PPTX
WCF Security, FSec
PPTX
WCF Fundamentals
PPTX
Advanced WCF Workshop
PDF
Wcf development
PDF
Windows Communication Foundation (WCF)
PPTX
Windows Communication Foundation (WCF)
Wcf Transaction Handling
Wcf for the web developer
WCF (Windows Communication Foundation)
WCF 4.0
WCF Security, FSec
WCF Fundamentals
Advanced WCF Workshop
Wcf development
Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)
Ad

Similar to Advanced WCF (20)

PPTX
Introduction to Microservices
PPTX
Module 5 Application and presentation Layer .pptx
PPTX
Distributed Kafka Architecture Taboola Scale
PDF
Arsitektur Aplikasi Modern - Faisal Henry Susanto
PPT
Servlet (1) also contains code to create it.ppt
PPT
Servlet123jkhuiyhkjkljioyudfrtsdrestfhgb
PPT
introduction to Web system
PPTX
Introduction and Basics to web technology .pptx
PPT
web services-May 25.ppt
PPT
Servlet.ppt
PPT
Servlet.ppt
PPT
Servlet1.ppt
PPTX
APIs, STOP Polling, lets go Streaming
PDF
Web Services / Technology in Cloud Computing
PDF
Introduction to SDN
PPTX
Jeffrey Richter
PPTX
Next generation web protocols
PPTX
Introduction to Microservices Patterns
PPTX
Introduction to Microservices Patterns
PDF
09-01-services-slides.pdf for educations
Introduction to Microservices
Module 5 Application and presentation Layer .pptx
Distributed Kafka Architecture Taboola Scale
Arsitektur Aplikasi Modern - Faisal Henry Susanto
Servlet (1) also contains code to create it.ppt
Servlet123jkhuiyhkjkljioyudfrtsdrestfhgb
introduction to Web system
Introduction and Basics to web technology .pptx
web services-May 25.ppt
Servlet.ppt
Servlet.ppt
Servlet1.ppt
APIs, STOP Polling, lets go Streaming
Web Services / Technology in Cloud Computing
Introduction to SDN
Jeffrey Richter
Next generation web protocols
Introduction to Microservices Patterns
Introduction to Microservices Patterns
09-01-services-slides.pdf for educations

Recently uploaded (20)

PPTX
Transform Your Business with a Software ERP System
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
AI in Product Development-omnex systems
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
history of c programming in notes for students .pptx
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Nekopoi APK 2025 free lastest update
PPTX
Online Work Permit System for Fast Permit Processing
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Understanding Forklifts - TECH EHS Solution
PDF
System and Network Administraation Chapter 3
Transform Your Business with a Software ERP System
Upgrade and Innovation Strategies for SAP ERP Customers
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Odoo POS Development Services by CandidRoot Solutions
AI in Product Development-omnex systems
Design an Analysis of Algorithms I-SECS-1021-03
CHAPTER 2 - PM Management and IT Context
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
How to Migrate SBCGlobal Email to Yahoo Easily
history of c programming in notes for students .pptx
Which alternative to Crystal Reports is best for small or large businesses.pdf
PTS Company Brochure 2025 (1).pdf.......
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Nekopoi APK 2025 free lastest update
Online Work Permit System for Fast Permit Processing
How to Choose the Right IT Partner for Your Business in Malaysia
Understanding Forklifts - TECH EHS Solution
System and Network Administraation Chapter 3

Advanced WCF

  • 1. WCF Tips and Tricks
  • 4. Streaming • When to use: – Data is too big and the transfer needs to be buffered – Data should be processed by chunks • Limitations: – Supported not in all bindings – Streaming methods can have only one parameter – Session is not supported when streaming data Streaming alternatives? DIY! (do it yourself) You can create several methods that will return data in chunks.
  • 5. Message Contracts • When to use: – You need full control of SOAP messages – You want to pass additional information with response (like security, etc.) – You want to add additional information with request, but don’t want to mess the interface for compatibility purposes – Useful together with streaming option
  • 6. Duplex Contracts sd Use Case Model WCF Client WCF Service GetData() getcallbackchannel() CallDuplexMethod()
  • 7. • When to use: – You need to define two-way communication between client and server – You need to notify client about some event • Limitations: – Duplex behavior is working only within a client session
  • 8. Create WCF client in code. • Why? – More control over client proxy – Want to track changes to the WCF client implementation • How? – Use of ClientBase – ChannelFactory
  • 9. Service Discovery • Announcement endpoints – Useful to notify other clients about service start/stop • Metadata exchange (mex) – Defines endpoint which provides information about service interface • WS-Discovery – Enables service discovery on the network
  • 12. Useful links: • Service discovery: http://msdn.microsoft.com/en- us/library/dd456791%28v=vs.110%29.aspx • ClientBase: http://msdn.microsoft.com/ru- ru/library/ms576141%28v=vs.110%29.aspx • ChannelFactory: http://msdn.microsoft.com/ru- ru/library/ms734681%28v=vs.110%29.aspx • Duplex services: http://msdn.microsoft.com/ru- ru/library/ms731064%28v=vs.110%29.aspx • Message contract: http://msdn.microsoft.com/ru- ru/library/ms730255%28v=vs.110%29.aspx • Streaming: http://msdn.microsoft.com/en- us/library/ms733742%28v=vs.110%29.aspx