WCF Fundamentals

Document Sample
WCF Fundamentals Powered By Docstoc
					Windows Communication Foundation
      Hosting & Endpoints




              Winter 2006




       Introducing the ABCs of Windows
      Communication Foundation | Feb 2006
              rickgaribay.net
WCF Hosting & Endpoints

   Agenda

       Address, Binding, Contract & Hosting
       WCF Endpoints
       Architecture
       Hosting Options
       basicHttpBinding Demo
       netTcpBinding & netMsmqBinding Demo




                             Introducing the ABCs of Windows
                            Communication Foundation | Feb 2006
                                    rickgaribay.net
About Me


   Microsoft Certified Professional .NET, MCAD, .NET
   7+ years professional experience developing Microsoft solutions for the
    retail, financial services and environmental, health & safety industries.
   Primary focus on Enterprise Application Integration architectures:
      .NET Framework
      BizTalk Server
      Host Integration Server




                                  Introducing the ABCs of Windows
                                 Communication Foundation | Feb 2006
                                         rickgaribay.net
     Address, Binding, Contract & Hosting

            The ABCs of Windows Communication Foundation:

An Address uniquely identifies a service.
                                                                                            Bindings provide “canned” policies that implement
Provides the transport protocol, name of target
                                                                                            the WCF features required to support the design
machine (host) and port if applicable.
                                                                                            goals of the service.
Expressed as an explicit path or URI:
                                                                                            Some common bindings include:
[transport]://[machine][:optional port]               Address               Binding         basicHttpBinding
http://localhost                                                                            netTcpBinding
http://localhost:8081                                                                       wsHttpBinding
http://localhost:8081/Service                                                               netMsqmqBinding
net.tcp://localhost:8082/Service
net.pipe://localhost/Pipe
                                                                                            WCF services must be hosted by a Windows
All services expose a Contract.                                                             Process (host process).

WCF uses 3 types of contracts:                         Contract               Hosting       Hosting options include:
Service Contract – Exposes the service.                                                     IIS 5 & 6
Operation Contract- Exposes the service members.                                            IIS 7 & Windows Activation Service (WAS)
Data Contract – Describes service parameters.                                               SmartClient, Console or Windows Service (also
Fault Contracts – Defines error handling semantics.                                         called “Self-Hosting”)




                                                       Introducing the ABCs of Windows
                                                      Communication Foundation | Feb 2006
                                                              rickgaribay.net
WCF Endpoints

     WCF Services are deployed, discovered and consumed as endpoints.




    Address    Binding
        Endpoint


         Contract                                           WCF Service




                            Introducing the ABCs of Windows
                           Communication Foundation | Feb 2006
                                   rickgaribay.net
Architecture

       Process A



          Client

                              Proxy
                                              Channel      Channel



     Proxy

                        Proxy                             Transport
                                                                                      MSMQ Endpoint



         Channel
                                                                                           IPC Endpoint
                                                                                                                 Service
                                                          Dispatcher
                                                                                           TCP Endpoint
                                  Transport
         Transport



    Process B                                                        Process C



         Transport
                                                                 Transport       Channel             Channel

                      MSMQ Endpoint
          Channel
                                                                                                    Dispatcher

                        IPC Endpoint
                                                Service
          Channel
                                                                                     MSMQ Endpoint
                       HTTP Endpoint



         Dispatcher                                                                        IPC Endpoint
                                                                                                                 Service

                                                                                      HTTP Endpoint




                                        Introducing the ABCs of Windows
                                       Communication Foundation | Feb 2006
                                                  rickgaribay.net
  Hosting Options




                                                                              2008
                                                                    Windows Server 2007 ~ 2008
                                                                           IIS 7, WAS




2006                                                                                             2008



                                             Today
                     .NET 3.0 (Windows Vista SDK)   Windows Vista
                    IIS 5, IIS 6, Self Hosting        IIS 7, WAS




                               Introducing the ABCs of Windows
                              Communication Foundation | Feb 2006
                                        rickgaribay.net
Demos

   IIS Hosting with basicHttpBinding
   Self Hosting with multiple endpoints




                              Introducing the ABCs of Windows
                             Communication Foundation | Feb 2006
                                     rickgaribay.net
Questions?

   References

     IDesign WCF Master Class, Microsoft Silicon Valley Campus, San Jose, CA.
      June 2006.

     IDesign WCF Standard

     Programming WCF Services, Juval Lowy, 2007 O’Reilly Press.




                              Introducing the ABCs of Windows
                             Communication Foundation | Feb 2006
                                     rickgaribay.net

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:10
posted:11/7/2012
language:simple
pages:9