Whats new in WCF 4.0
Whats new in WCF 4.0about.me/Chakravarthy About ME1.40
About MEMCA, MVP, MCPD, MCTS and CSMj.mp/CareerHistoryDeveloper turned ArchitectWHAT !!Who else !!
AgendaWhats new !!??ConfigurationTracingSerializationMessage queuingService discoveryRoutingWorkflow servicesDemo3.40
Lets start ..
Whats new in WCF
Kalpana (1948) is a Bollywood movie from a time before the term had been invented. This 155-minute-long black-and-white feature film gives full rein to the talents of choreographer Uday Shankar, the films director and a legend of Indian dance. The film is about a young dancer who dreams of founding his own dance school, played by the director himself. Despite living until the age of 76, Kalpana is the one and only film Uday Shankar directed in his entire career. In the dance world, however, he will be remembered as a veritable master of the art of choreography. Kalpana will be screened at Cannes Classics on Thursday 17th May at 19:30, Salle Buuel.After ..6.40
Far from the world of Indian dancing, After the Curfew (1954) has as its backdrop the post-war period in Indonesia. In the months following independence, Iskandar returns to civilian life. For this medical student it is a time of bitter disillusionment, as he sees corruption and political incompetence take hold throughout the country. The director, Usmar Ismail, is considered as one of the forefathers of Indonesian cinema. He made a major contribution to the development of Indonesian cinema in the 1950s by founding Perfini, the countrys first film studios. After The Curfew will be screened at Cannes Classics on Thursday 17th May at 17:15, Salle Buuel.
Source : http://j.mp/WCF4ConfigImp a) Configuration ImprovementsRemoved the need for explicit per-service configurationdefault values for WCF bindings & behaviorsthe standard endpoint, which will allow you to define reusable preconfigured endpointsDefault Binding10.40
Default bindings & behaviors Config Improv11.40
Source : http://j.mp/WCF4ConfigImp Configuration ImprovementsFileless Activ12.40
File-less activationIn WCF 4, you no longer need physical .svc files to activate servicesInstead you can define a virtual mapping in config
Default endpointsWCF 3.x services required at least one endpoint or youd get an exceptionWCF 4.0 services come with default endpointsOne default endpoint per contract/base address combinationAssuming you havent defined any manuallyIf youve defined at least one endpoint, you wont get default endpointsStd EPs14.40
Standard endpointsWCF 4 also comes with several preconfigured standard endpointsThese cover some of the most common usage scenariosYou can simply reuse them as-is without changeYou refer to standard endpoints by name using the kind attributeMakes it easier to get up and running in certain scenarios
Media Formats 15.40
Formats and FlexibilityApprox 90016.40
preConfig EndPointsapplication/jsonapplication/xmlapplication/atom+xmlimage/pngtext/directorytext/calendarapplication/xaml+xmltext/htmlimage/svg+xmlmultipart/form-dataapplication/x-www-form-urlencodedApprox 900 App media types!17.40
MIX 1112/12/2013 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.17
preconfigured Standard endpoints in v4.0Standard endpoint nameDescriptionmexEndpointDefines a standard endpoint for MEX configured with IMetadataExchange for the service contract, mexHttpBinding as the default binding (you can change this), and an empty address.dynamicEndpointDefines a standard endpoint configured to use WCF Discovery within a WCF client application. When using this standard endpoint, an address is not required because during the first call, the client will query for a service endpoint matching the specified contract and automatically connect to it for you. discoveryEndpointDefines a standard endpoint that is pre-configured for discovery operations within a client application. The user needs to specify the address and the binding when using this standard endpoint. udpDiscoveryEndpointDefines a standard endpoint that is pre-configured for discovery operations within a client application using the UDP binding at a multicast address.Derives from DiscoveryEndpoint.announcementEndpointDefines a standard endpoint that is pre-configured for the announcement functionality of discovery. The user needs to specify the address and the binding when using this standard endpoint. udpAnnouncementEndpointDefines a standard endpoint that is pre-configured for the announcement functionality over a UDP binding at a multicast address. This endpoint derives from announcementEndpoint.workflowControlEndpointDefines a standard endpoint for controlling execution of workflow instances (create, run, suspend, terminate, etc).webHttpEndpointDefines a standard endpoint configured with WebHttpBinding and WebHttpBehavior. Use to expose REST services.webScriptEndpointDefines a standard endpoint configured with WebHttpBinding and WebScriptEnablingBehavior. Use to expose Ajax services.
Default protocol mapping How 2 Choose19.40
How to choose a BindingInside Firewall & .NET to .NETLocal OnlyYesNoSupport Legacy?YesNoYesNoNeed to DisconnectYesNoNetTcp BindingNetMsmq BindingNetNamedPipe BindingBasicHttp BindingWsHttp BindingMSMQ ClientYesNoMsmq Integration BindingDef behavior20.40
Default behavior configuration
12/12/2013 3:14 AM2005 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.22
Message Pump as a ServiceScenariosBasic Message RoutingProtocol BridgingService AggregationVersioningConcernsConnection StateSecurityDelivery FailureTransactionsMessage Pump
Inbound ChannelOutbound ChannelRoutingService: A Message Pump Service for you to host, extend, and enjoy!Routing ServiceRoutingServiceMsg Rout23.40
Message RoutingClientTimeServiceRoutingServiceEchoIRequestReplyRouterBasicHttphttp://routinghost/routerABCSupported Message Exchange PatternsMulticastInterfaceRequest Reply, Sessionful Request ReplyNoIRequestReplyRouterOneWayYesISimplexDatagramRouterSessionful OneWayYesISimplexSessionRouterSessionful DuplexYesIDuplexSessionRouter
Message RoutingMessageFilterEndpointaction == http://Message/EchoEchoaction == http://Message/GetCurrentTimeTimeService
ClientTimeServiceRoutingServiceEchoFilter OnMessageFilterActionActionMessageFilterAddress headerAddressMessageFilterAddress header longest prefix matchingAddressPrefixMessageFilterEndpoint NameEndpointNameMessageFilterNo Filter matches everythingMatchAllMessageFilterLogical And of two filtersStrictAndMessageFilterXPath expressionXPathMessageFilterCustomCustom
Replaceable atRuntimeProtocol Brdg25.40
Net.TcpSOAP 1.1SOAP 1.2Security26.40
Message sent usingClient IdentityMessage sent usingRouting Service IdentityMessage sent usingClient IdentityImpersonation using WindowsIdentityTokenErr Hndl27.40
Error HandlingClientBackupEcho Service
MessageFilterEndpointAlternateEndpointsaction == http://Message/EchoEchoBackupEchoService
Router ServiceFirst-class "router" serviceSimply host the RoutingService classYou host it like any other WCF serviceConfigure with routing filters to do content-based routing
Host Rut Srv29.40
Hosting the RoutingServiceAdditional routing service capabilitiesProtocol bridging (client sends over HTTP, router sends over TCP, etc)Error handling support (router configured with backup endpoints)Multi-cast routing support (router sends to multiple endpoints)Using Rut Srv30.40
Using the Routing ServiceCreate regular WCF Services to be called by the Routing Service.Create a Routing Service:Change the markup in the .svc file to point to the routing Service.
Be sure to reference System.ServiceModel.Routing in your project
In the web.config:Add endpoints for all the services to which youll connect in the section.
Using the Routing Service (contd)In the web.config (contd):Create a namespace filter and set the Xpath filterData
Add filterTables to point to the correct end points
Set the Routing behavior to identify the filterTables
Demo: Simple routing service exampleDEMO
33Tech Ed North America 201012/12/2013 3:14 AM 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/