際際滷

際際滷Share a Scribd company logo
WCF: ITS
BAAACK
Tech Valley .NET User Group
November 2010
Andy Badera andrew@badera.us
Client Services, Apprenda, Inc.
WCF in .NET 4.0
Discovery, failover, bridging &
REST
AGENDA
 Review
 Whats New
 Discovery
 Tracing
 Break
 Failover (routing)
 Protocol bridging (routing)
 REST
 Q&A
APPRENDA & SAASGRID
 VC-backed ($6.5M) startup in Clifton Park  hiring!
 Scalable SaaS-enablement platform & WCF grid for .NET
 Transform single tenant apps -> multitenant
 We reduce your time to market/revenue
 Heavy manipulation of WCF configuration
 Inject endpoints for grid awareness/participation
 Inject behaviors for session management and
tenancy/subscription enforcement
ABCS OF WCF
 Address
 Binding
 Contract
HOSTING WCF
 IIS (HTTP/S)
 Within a WCF application (WinForms, WCF; P2P, rich clients)
 Hosted by a Windows service
 WAS (non-HTTP via IIS model)
 AppFabric
WCF DEVELOPMENT/DEBUGGING
 C:Program Files (x86)Microsoft Visual Studio
10.0Common7IDE
 WcfTestClient
 C:Program FilesMicrosoft SDKsWindowsv7.1Bin
 SvcUtil  proxy autogenerator  Add Service Reference
 SvcConfigEditor  WCF Service Configuration Editor
 SvcTraceViewer
WHATS NEW IN 4.0
 VS2010 Training Kit labs
 Zero-configuration services
 Default behaviors & bindings
 Fileless activation (IIS/WAS)
 Standard endpoints
WHATS NEW IN 4.0
 Discovery (WS-Discovery)
http://docs.oasis-open.org/ws-dd/discovery/1.1/wsdd-discovery-
1.1-spec.html
 Routing
 Failover
 Protocol bridging
STANDARD ENDPOINTS
 Well-known infrastructure & application service types
 Designated by kind attribute
 Specify no binding, no contract  well-known
DEFAULTS
 Default behavior - unnamed behavior
 Default binding  protocol mappings
DISCOVERY  WS-DISCOVERY
DISCOVERY  WINDOWS RALLY
AD HOC DISCOVERY - UDP
 System.ServiceModel.Discovery
 Sync or Async
 Broadcasts announcements
 Well-known standard endpoints  UdpDiscoveryEndpoint,
UdpAnnouncementEndpoint
 Filtered by various criteria
 Metadata  System.ServiceModel.Description
AD HOC DISCOVERY - UDP
TRACING
 WCF trace logs
 Network (netmon, Wireshark)
MANAGED DISCOVERY
MANAGED DISCOVERY
MANAGED DISCOVERY  MS
STYLE
BRIDGING
 System.ServiceModel.Routing
 <routing /> in .config
 Filters & filterType
FAILOVER
 <backupLists /> in <routing /> in .config
 backupList per filter
REST
 REST Hands On Labs
 REST Starter Kit  obsolete?
 Fileless activation
RESTFUL URIS
 URI templates
 Old  .svc breaks REST URI protocol
 New  better but not perfect
 URL Routing or URL Rewriting
Q&A
UPCOMING EVENTS
 CloudCamp
 GiveCamp (Will Platnick, ActiveHost)
 Code Camp

More Related Content

Similar to WCF in .NET 4.0 - TVUG November 2010 (20)

PDF
Wcf 40 Multitier Services Development With Linq To Entities Mike Liu
hanedanti
PDF
Wcf 40 Multitier Services Development With Linq To Entities Mike Liu
hanedanti
PPTX
1. WCF Services - Exam 70-487
Bat Programmer
PPTX
A presentation on WCF & REST
Santhu Rao
PPTX
web programming
sakthibalabalamuruga
PPTX
News In Wcf40
Florin Cardasim
PPT
Dot Net Training Wcf Dot Net35
Subodh Pushpak
PDF
Wcf tutorials
jinaldesailive
PPT
WCFPresentation.ppt WCFPresentation.ppt WCFPresentation.ppt
yatakonakiran2
PPTX
What's New in WCF 4.5
Ido Flatow
PDF
WCF Interview Questions By Scholarhat PDF
Scholarhat
DOC
WCF tutorial
Abhi Arya
PPT
Session 1 Shanon Richards-Exposing Data Using WCF
Code Mastery
PPTX
Windows Communication Foundation (WCF)
Betclic Everest Group Tech Team
PDF
WCF Multi Layer Services Development with Entity Framework 4th Edition Editio...
mjwyblsz913
PDF
WCF Multi Layer Services Development with Entity Framework 4th Edition Editio...
rideslukan72
PPTX
WCF - In a Week
gnanaarunganesh
PPS
WCF (Windows Communication Foundation_Unit_01)
Prashanth Shivakumar
PPTX
Windows Communication Foundation
Mahmoud Tolba
PPT
Service Oriented Development With Windows Communication Foundation Tulsa Dnug
Jason Townsend, MBA
Wcf 40 Multitier Services Development With Linq To Entities Mike Liu
hanedanti
Wcf 40 Multitier Services Development With Linq To Entities Mike Liu
hanedanti
1. WCF Services - Exam 70-487
Bat Programmer
A presentation on WCF & REST
Santhu Rao
web programming
sakthibalabalamuruga
News In Wcf40
Florin Cardasim
Dot Net Training Wcf Dot Net35
Subodh Pushpak
Wcf tutorials
jinaldesailive
WCFPresentation.ppt WCFPresentation.ppt WCFPresentation.ppt
yatakonakiran2
What's New in WCF 4.5
Ido Flatow
WCF Interview Questions By Scholarhat PDF
Scholarhat
WCF tutorial
Abhi Arya
Session 1 Shanon Richards-Exposing Data Using WCF
Code Mastery
Windows Communication Foundation (WCF)
Betclic Everest Group Tech Team
WCF Multi Layer Services Development with Entity Framework 4th Edition Editio...
mjwyblsz913
WCF Multi Layer Services Development with Entity Framework 4th Edition Editio...
rideslukan72
WCF - In a Week
gnanaarunganesh
WCF (Windows Communication Foundation_Unit_01)
Prashanth Shivakumar
Windows Communication Foundation
Mahmoud Tolba
Service Oriented Development With Windows Communication Foundation Tulsa Dnug
Jason Townsend, MBA

Recently uploaded (20)

PDF
Redefining Work in the Age of AI - What to expect? How to prepare? Why it mat...
Malinda Kapuruge
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
PDF
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
ScyllaDB
PDF
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
PPTX
UserCon Belgium: Honey, VMware increased my bill
stijn40
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
PDF
The Future of Product Management in AI ERA.pdf
Alyona Owens
PDF
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
PDF
The Growing Value and Application of FME & GenAI
Safe Software
PDF
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
PPTX
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
PDF
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
PPTX
Enabling the Digital Artisan keynote at ICOCI 2025
Alan Dix
PDF
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
PDF
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
PPSX
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
PPTX
Practical Applications of AI in Local Government
OnBoard
PDF
UiPath Agentic AI ile Ak脹ll脹 Otomasyonun Yeni a脹
UiPathCommunity
PPTX
01_Approach Cyber- DORA Incident Management.pptx
FinTech Belgium
PDF
From Chatbot to Destroyer of Endpoints - Can ChatGPT Automate EDR Bypasses (1...
Priyanka Aash
Redefining Work in the Age of AI - What to expect? How to prepare? Why it mat...
Malinda Kapuruge
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
ScyllaDB
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
UserCon Belgium: Honey, VMware increased my bill
stijn40
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
The Future of Product Management in AI ERA.pdf
Alyona Owens
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
The Growing Value and Application of FME & GenAI
Safe Software
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
Enabling the Digital Artisan keynote at ICOCI 2025
Alan Dix
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
Practical Applications of AI in Local Government
OnBoard
UiPath Agentic AI ile Ak脹ll脹 Otomasyonun Yeni a脹
UiPathCommunity
01_Approach Cyber- DORA Incident Management.pptx
FinTech Belgium
From Chatbot to Destroyer of Endpoints - Can ChatGPT Automate EDR Bypasses (1...
Priyanka Aash
Ad

WCF in .NET 4.0 - TVUG November 2010

  • 1. WCF: ITS BAAACK Tech Valley .NET User Group November 2010 Andy Badera andrew@badera.us Client Services, Apprenda, Inc. WCF in .NET 4.0 Discovery, failover, bridging & REST
  • 2. AGENDA Review Whats New Discovery Tracing Break Failover (routing) Protocol bridging (routing) REST Q&A
  • 3. APPRENDA & SAASGRID VC-backed ($6.5M) startup in Clifton Park hiring! Scalable SaaS-enablement platform & WCF grid for .NET Transform single tenant apps -> multitenant We reduce your time to market/revenue Heavy manipulation of WCF configuration Inject endpoints for grid awareness/participation Inject behaviors for session management and tenancy/subscription enforcement
  • 4. ABCS OF WCF Address Binding Contract
  • 5. HOSTING WCF IIS (HTTP/S) Within a WCF application (WinForms, WCF; P2P, rich clients) Hosted by a Windows service WAS (non-HTTP via IIS model) AppFabric
  • 6. WCF DEVELOPMENT/DEBUGGING C:Program Files (x86)Microsoft Visual Studio 10.0Common7IDE WcfTestClient C:Program FilesMicrosoft SDKsWindowsv7.1Bin SvcUtil proxy autogenerator Add Service Reference SvcConfigEditor WCF Service Configuration Editor SvcTraceViewer
  • 7. WHATS NEW IN 4.0 VS2010 Training Kit labs Zero-configuration services Default behaviors & bindings Fileless activation (IIS/WAS) Standard endpoints
  • 8. WHATS NEW IN 4.0 Discovery (WS-Discovery) http://docs.oasis-open.org/ws-dd/discovery/1.1/wsdd-discovery- 1.1-spec.html Routing Failover Protocol bridging
  • 9. STANDARD ENDPOINTS Well-known infrastructure & application service types Designated by kind attribute Specify no binding, no contract well-known
  • 10. DEFAULTS Default behavior - unnamed behavior Default binding protocol mappings
  • 13. AD HOC DISCOVERY - UDP System.ServiceModel.Discovery Sync or Async Broadcasts announcements Well-known standard endpoints UdpDiscoveryEndpoint, UdpAnnouncementEndpoint Filtered by various criteria Metadata System.ServiceModel.Description
  • 15. TRACING WCF trace logs Network (netmon, Wireshark)
  • 18. MANAGED DISCOVERY MS STYLE
  • 19. BRIDGING System.ServiceModel.Routing <routing /> in .config Filters & filterType
  • 20. FAILOVER <backupLists /> in <routing /> in .config backupList per filter
  • 21. REST REST Hands On Labs REST Starter Kit obsolete? Fileless activation
  • 22. RESTFUL URIS URI templates Old .svc breaks REST URI protocol New better but not perfect URL Routing or URL Rewriting
  • 23. Q&A
  • 24. UPCOMING EVENTS CloudCamp GiveCamp (Will Platnick, ActiveHost) Code Camp

Editor's Notes

  • #2: Who here has heard of WCF? Who here has used WCF? XML webservices? Who can tell me what SOAP stands for? Who has used RESTful webservices? Who can tell me what REST stands for?
  • #5: ABCs define an endpoint at a minimum the URI, port and binding of a service. Address is the URL and port. Binding is the transport protocol: http, https, net.tcp, etc. Contract is the contract, or interface, of the service being consumed.
  • #6: IIS ASP.NET-hosted .svc files; fileless activation WAS message-based activation (RESTful URLs; MVC?) Show self-hosting/service hosting? Show WCF as ASMX trick? Show .svc consumed by plain web/AJAX clients (AspNetCompatibility)
  • #7: YMMV on paths. Enable metadata on previous configuration-less example. Browse by web. Create WcfTestClient client, invoke. Disable metadata. Browse by web. Invoke by client. One of the trickier things with WCF, especially pre-4.0, is the complexity of configuration files. SvcConfigEditor makes it fairly simple to validate services, clients, behaviors & etc. as you add them through a GUI.
  • #8: Show 3.5 config. Show configuration-less .svc deployment in 4.0.
  • #10: i.e. Mex is always IMetadataExchange Mex EndpointA standard endpoint that is used to expose service metadata. AnnouncementEndpointA standard endpoint that is used by services to send announcement messages. DiscoveryEndpointA standard endpoint that is used by services to send discovery messages. UdpDiscoveryEndpointA standard endpoint that is pre-configured for discovery operations over a UDP multicast binding. UdpAnnouncementEndpointA standard endpoint that is used by services to send announcement messages over a UDP binding. DynamicEndpointA standard endpoint that uses WS-Discovery to find the endpoint address dynamically at runtime. ServiceMetadataEndpointA standard endpoint for metadata exchange. WebHttpEndpointA standard endpoint with a油WebHttpBinding油binding that automatically adds the油WebHttpBehavior油behavior WebScriptEndpointA standard endpoint with a油WebHttpBinding油binding that automatically adds the油WebScriptEnablingBehavior油behavior. WebServiceEndpointA standard endpoint with a油WebHttpBinding油binding. WorkflowControlEndpointA standard endpoint that enables you to call control operations on workflow instances. WorkflowHostingEndpointA standard endpoint that supports workflow creation and bookmark resumption.
  • #11: Is everyone familiar with WCF endpoint behaviors? Allows control of exception detail in error responses, service metadata, service discovery, timeouts, packet size and throttling for services and clients, myriad other facets of client and service behaviors. Default behavior applies to any defined service that does not explicitly specify another behavior. Note: the configuration editor tool from the SDK does not appear to like empty name or null name values. Default protocol mapping order is defined machine.config; can be overridden in machine.config, app.config, web.config. Default order in machine.config begins with basicHttp.
  • #12: All SOAP all metadata is XML, found throughout the messaging actions.
  • #14: Discovery criteria include contract types, binding elements, namespace, scope, and keywords or version numbers
  • #15: To find a service, clients send a油Probe油request that contains specific criteria such as service contract type, keywords, and scope on the network. Services receive the油Probe油request and determine whether they match the criteria. If a service matches, it responds by sending aProbeMatch油message back to the client with the information necessary to contact the service. Clients can also send油Resolve油requests that allow them to find services that may have changed their endpoint address. Matching services respond to油Resolve油requests by sending a油ResolveMatch油message back to the client. Work through Exercises 4-6; show next slide Tracing while work-in-progress.
  • #16: Show trace(s) on UDP discovery while working through Exercises 4-6.
  • #17: Utilizes a discovery proxy (dp). Ad hoc and managed will exhibit different network traffic behaviors, so one or the other may be more appropriate or provide better results in various scenarios. (P2P vs. client-server with failover, etc.) Up to the developer to understand the needs of their system; network profiling is a good tool.
  • #19: Work through Exercise 7.
  • #20: Generic, configurable SOAP intermediary. Updatable router config without service restart. Content-based XPath-driven routing. Do Exercise 8. Note name RouterService needs to be CalculatorService for client to call the router service. Comment out net.tcp endpoint.
  • #21: Talk about failover Do Exercise 10. Show service, network? traces from failover
  • #22: Demo fileless activation
  • #23: Do REST Lab 1. Do REST Lab 2. Show WCF REST Service Template using routes instead of URL Rewrite.