Windows Communication Foundation Part 1 You can reuse these slides but please mention the original source if you want to do so. Speaker: Nguyễn Bá Quang.

Slides:



Advertisements
Similar presentations
Indigo Jonathan Turnbull Nick Cartwright Ivan Konontsev Chris Bright.
Advertisements

Michael S. Chan xLM Solutions, LLC
WCF Intro Scott Reed Owner - Brain Hz Software Instructor – DevelopMentor
1 Windows Communication Foundation Adapters in BizTalk Server 2006 R2 Ulrich Roxburgh Services2 Ltd. SOA307.
Zoiner Tejada Hershey Technologies. About Zoiner Tejada.
 Introduction  WCF Definition  WCF Architecture  Implementation  WCF Demo Overview.
Windows Communication Foundation and Web Services.
X.509 support in WCF Exploring support for X.509 Certificates in Microsoft’s Windows Communication Foundation Paul Cormier UCCS CS591 Fall 2009.
Adam Dille CS526 – Spring  Advances in Microsoft’s service offerings  ASMX vs. WCF  Latest WCF Improvements (.NET 4.0)  No in-depth study of.
The Microsoft Technical Roadshow 2006 Windows Communication Foundation Mike Taulty Developer & Platform Group Microsoft Ltd
Module 13: WCF Receive Adapters. Overview Lesson 1: Introduction to WCF Receive Adapters Lesson 2: Configuring a WCF Receive Adapter Lesson 3: Using the.
Getting Started with Windows Communication Foundation 4.5 Ed Jones, MCT, MCPD, MCTS Consultant RBA Inc.
Getting Started with WCF Windows Communication Foundation 4.0 Development Chapter 1.
Building Offline/Cache Mode Web Apps Using Sync Framework Mike Clark Group Manager Cloud Data Services Team
Copyright ©2004 Virtusa Corporation | CONFIDENTIAL Introduction to Windows Communication Foundation Ruwan Wijesinghe.
[Title of the course] WCF
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
Keith Elder Microsoft MVP INETA Speaker Blog: Demystifying Windows Communication Foundation.
Doing Something Useful with Enterprise Library 3.0 Benjamin Day Level: Intermediate.
Agenda What Is the Windows Communication Foundation? How Does It Work? How Do I Use and Deploy It? Bindings Addresses Contracts How to host WCF services.
Module 14: WCF Send Adapters. Overview Lesson 1: Introduction to WCF Send Adapters Lesson 2: Consuming a Web Service Lesson 3: Consuming Services from.
1 Windows Communication Foundation: Integrating COM+ and MSMQ Applications Andy Milligan COM305 Program Manager Microsoft Corporation.
Microsoft Visual Studio 2010 Muhammad Zubair MS (FAST-NU) Experience: 5+ Years Contact:- Cell#:
Tom Castiglia Hershey Technologies
Microsoft Visual Studio 2010 Muhammad Zubair MS (FAST-NU) Experience: 5+ Years Contact:- Cell#:
Intro to WCF From the beginning and uses Steve AppRochester.
Paul Johansen – October Mankato.NET Users Group. Agenda  WCF Essentials  Bunch o’ demos Coding from scratch Why the Visual Studio tools suck  Additional.
Random Logic l Forum.NET l Web Services Enhancements for Microsoft.NET (WSE) Forum.NET ● October 4th, 2006.
Developing Web Services Using ASP.NET and WSE That Interoperate with the Windows Communications Foundation ("Indigo") Mark Fussell COM432 Lead Program.
Virtual techdays INDIA │ august 2010 Deep Dive into WCF 4.0 Features Sarath S S V S │ Program Manager, BING, Microsoft India R&D.
Mahesh Krishnan, Senior Consultant, Readify Slide 1.
Telerik Software Academy Web Services & Cloud.
Introducing the ABCs of Windows Communication Foundation | Feb 2006 rickgaribay.net Windows Communication Foundation Hosting & Endpoints Winter 2006.
2 Productive Windows Communication Foundation Jeremy Boyd Mindscape MSDN Regional Director – New Zealand SOA315.
INT-9: Implementing ESB Processes with OpenEdge ® and Sonic ™ David Cleary Principal Software Engineer.
Presentation 24: Windows Communication Foundation Introduced Objektorienteret Netværkskommunikation.
Agenda What Is the Windows Communication Foundation? How Does It Work? How Do I Use and Deploy It? Bindings Addresses Contracts How to host WCF services.
Satisfy Your Technical Curiosity Beyond ABC: WCF practices from the field Christian Weyer thinktecture Co-Founder & Solution Architect
Dhananjay Kumar MVP-Connected System 1. WCF  Agenda What is WCF ? Why WCF? Address, Binding, Contract End Points Hosting Message Patterns Programming.
Christian Weyer thinktecture.
Introduction to.NET FX 3.0 (+ sneak preview of.NET FX 3.5) Martin Parry Developer & Platform Group Microsoft Ltd
The SOAP Story Martin Parry Developer & Platform Group Microsoft Ltd
Windows Communication Foundation António Cruz Freelancer (SAPO/PT.COM)
.NET Framework Enterprise. Agenda WCF Overview WCF Solutions WF Overview WF Solutions Card Spaces Bringit it all together: Dinner Now Scenario.
Shani Raba Team Leader & Software Architect
OE-NIK HP Advanced Programming WCF WCF SOAP service, host, client Exception handling (NOT required)
Windows Communication Foundation Stipe Ivan Latković.
Nati Dobkin
O VERVIEW OF SOA AND WCF Jinaldesai.net – My Thouths And Learnings.
Windows Communication Foundation. Agenda How We Got Here ASMX vs WCF Throwdown WCF Contracts Service Data Message Bindings Security Reliability Declarative.
Windows Communication Foundation and Web Services
Introducing the Microsoft® .NET Framework
Windows Communication Foundation
Segments Introduction: slides 2–7 10 minutes
4/12/2018 2:37 PM Windows Communication Foundation: Migration, interop, upgrade, and integration Risman Adnan ISV Lead, Microsoft Indonesia
Windows Communication Foundation
Windows Communication Foundation
Window Communication Foundation
Self Healing and Dynamic Construction Framework:
WCF.
Windows Communication Foundation (WCF)
Enterprise Library Overview
Distribution of functionality Webservice using WCF
Windows Communication Foundation and Web Services
Windows Communication Foundation
WSE 3.0 的网络服务安全 Security in WSE 3.0 Hongmei Ge Con321
Windows Communication Foundation (WCF)
Distributed Applications on Windows Vista
The SOAP Story Martin Parry Developer & Platform Group Microsoft Ltd
WCF Data Services and Silverlight
Presentation transcript:

Windows Communication Foundation Part 1 You can reuse these slides but please mention the original source if you want to do so. Speaker: Nguyễn Bá Quang & Trịnh Minh Cường

Agenda WCF Unified Model Simple demo ClientsHosting WCF Architecture Detail Endpoints ABCs and Behaviors

Overview and Architecture

Unified Model Basic Open Interop Basic Open Interop ASMX Secure Open Interop Secure Open Interop WSE Fast Secure Binary Fast Secure Binary Remoting Queued Txns Queued Txns MSMQ Fast Secure Binary Txns Fast Secure Binary Txns Enterprise Services Image from WCF presentation by Mike Taulty - Vista Developer Launch

Unified Model Benefits Programming model Learning curve Consistency Write less code when using multiple technologies FlexibilityEnvironments Productivity in development environment Simplify Automated Integration Testing Deployment options in production Design for distribution, run local

WCF Architecture ClientService Message ABCABC AddressBindingContract (Where)(How)(What) Bv Bv Bv Bv ABC Endpoint

WCF Architecture: Messaging Runtime TransportEncoderProtocol(s)TransportEncoderProtocol(s) Client Dispatcher Service Contract and Behaviors Binding Address

Service Model Layer Influences system operation based on incoming and outgoing messages. Effects of behaviors are local. Messaging Layer Moves messages back and forth and adds transfer semantics. Channels are symmetric. ServiceCode Message Inspector Formatter Behavior Instancing Behavior Security Channel TCP Transport Security Channel TCP Transport Transaction Behavior Formatter Behavior WCF Architecture: Composition & Behaviors

3 Ways to Talk One Way: Datagram-style delivery Request-Reply Immediate Reply on same logical thread Duplex Reply “later” and on backchannel (callback-style) ClientService One Way Request-Reply Duplex (Dual)

Demo #1: Simple console WCF app 01_WCFServiceLibrary Create WCF service How to test service through web browser How to consumes it 10

Client side: Add Service

Service Clients Through code or configuration Service knowledge Extract metadata SvcUtil.exe Custom tool Generates code and config Share Types Service, Data, Faults Reusing existing types on the client Set Name and Namespace GSC SSC RSC

Service Metadata OperationsTypesAddressesBindingsPolicies Described using WSDLWS-Policy Image from WCF presentation by Mike Taulty - Vista Developer Launch

Demo mex: 02_ConsoleWCFWithConfig 14

Service Hosting

Where Are We? ServiceHostDescription Behaviour EndpointAddressBindingContract Behaviour Operation Behaviour RuntimeListenersSitesExtensions

Demo: different type of hostings Quang Self Host IIS Host Windows Service Host 17

Where Are We? ServiceHostDescription Behaviour EndpointAddressBindingContract Behaviour Operation Behaviour RuntimeListenersSitesExtensions

Address

Where Are We? ServiceHostDescription Behaviour EndpointAddressBindingContract Behaviour Operation Behaviour RuntimeListenersSitesExtensions

Endpoint Address UriIdentityHeaders

Address URI SchemeHostPortPath Port Sharing via HTTP.SYS Port Sharing via HTTP.SYS Port Sharing via TCP Port Sharing Service Port Sharing via TCP Port Sharing Service

Binding

Where Are We? ServiceHostDescription Behaviour EndpointAddressBindingContract Behaviour Operation Behaviour RuntimeListenersSitesExtensions

Bindings How to talk to the service endpoint Binding information categories ProtocolsSecurity Reliable messaging TransactionsEncodingTransport

Binding Layers and Elements Bindings are constructed from an ordered set of binding elements Binding elements add channels to the channel stack in the channel factories/listeners

Binding Features BindingInteroperabilitySecurity (Default)Session (Default)TransactionsDuplex BasicHttpBindingBasic Profile 1.1None, Transport, Message,None n/a WSHttpBindingWSTransport, Message, MixedNone, Transport, Reliable SessionNone, Yesn/a WSDualHttpBindingWSMessageReliable SessionNone, YesYes WSFederationHttpBindingWS-FederationMessageNone, Reliable SessionNone, YesNo NetTcpBinding.NET 3.0Transport, MessageReliable Session, TransportNone, YesYes NetNamedPipeBinding.NET 3.0TransportNone, TransportNone, YesYes NetMsmqBinding.NET 3.0Message, Transport, BothNoneNone, YesNo NetPeerTcpBindingPeerTransportNone Yes MsmqIntegrationBindingMSMQTransportNoneNone, Yesn/a

Configure binding 28 Entirely by code Using code and configuration file Demo how to use WCF Service Configuration Editor.

Demo #2 02_ConsoleWCF02_ConsoleWCFWithConfig 29

WCF Service Configuration Editor 30

Create Your Own Binding Custom Use CustomBinding Fill with binding elements Through code or configuration Inherit Derive from system-provided bindings User-defined Derive from Binding Add your own or system-provided elements

Demo 3 Ways to Talk One Way: Datagram-style delivery. Demo 03_OneWay Request-Reply Immediate Reply on same logical thread. 04_Asynchronous Duplex Reply “later” and on backchannel (callback-style) ClientService One Way Request-Reply Duplex (Dual)

Contract

Where Are We? ServiceHostDescription Behaviour EndpointAddressBindingContract Behaviour Operation Behaviour RuntimeListenersSitesExtensions

Contract Types ServiceContractOperationContractDataContractDataMemberFaultContractMessageContractMessageHeaderMessageBodyMember

[ServiceContract] Defines the service to be published Can be applied to interfaces and classes PropertiesNameNamespaceProtectionLevelCallbackContractSessionMode

[OperationContract] Defines operations provided by the service PropertiesIsOneWay No service exceptions when set to true IsInitiatingIsTerminatingProtectionLevelAction Use “*” to catch all messages OES OEC

Data Contracts [ DataContract ] PropertiesName Namespace (Default: [ DataMember ] PropertiesNameIsRequiredOrder Can be applied to any instance property, field or event Same namespace as the DataContract PDM

Collections Collections are interchangeable All list collections of the same type are considered to have the same data contract Same applies to dictionaries of the same type Concrete classes and interfaces [CollectionDataContract] More control over collection serialisation

Sharing DataContract ApproachesSvcutil.exe Share the type Reuse an existing type (struct/class/interface) Make sure you set the Name and Namespace SDC RDC

FaultContract Exceptions should be explicitly published Security Exception to fault mapping How to raise the fault? Decorate the fault with [DataContract] Decorate the operation contract with [FaultContract] Throw FaultException Throw FaultException How to handle the fault? Catch FaultException Catch FaultException Detail property of the exception is of type TDetail FDC FOC TFE CFE

Behaviors

Where Are We? ServiceHostDescription Behaviour EndpointAddressBindingContract Behaviour Operation Behaviour RuntimeListenersSitesExtensions

Behaviours SBV

Demo (Quang) PerCallPerSession 45

Demo: SilverLight consume basic web service ADO.net data service 46

Questions?