6. 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 film’s 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 Buñuel.
7. 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 country’s first film studios.
After The Curfew will be screened at Cannes Classics on Thursday 17th May at 17:15, Salle Buñuel.
10. a) Configuration Improvements
• Removed the need for explicit per-service
configuration
• default values for WCF bindings & behaviors
• the standard endpoint, which will allow you
to define reusable preconfigured endpoints
Source : http://j.mp/WCF4ConfigImp
11. Default bindings & behaviors
You can also
define default
binding and
behavior
configurations
• Simply define the binding/behavior without a name
• That binding takes effect for anything not assigned a
specific binding
• Can be defined at different scopes within config (e.g.
machine.config)
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
13. File-less activation
• In WCF 4, you no longer need physical .svc files to
activate services
– Instead you can define a virtual mapping in config
<serviceHostingEnvironment>
<serviceActivations>
<add relativeAddress ="EntertainmentServices.svc"
service="EntertainmentShows"/>
</serviceActivations>
</serviceHostingEnvironment>
</system.serviceModel>
14. Default endpoints
• WCF 3.x services required at least one endpoint or you’d get
an exception
• WCF 4.0 services come with default endpoints
– One default endpoint per contract/base address combination
– Assuming you haven’t defined any manually
– If you’ve defined at least one endpoint, you won’t get default
endpoints
15. Standard endpoints
• WCF 4 also comes with several
“preconfigured” standard endpoints
– These cover some of the most common usage
scenarios
– You can simply reuse them as-is without change
• You refer to standard endpoints by name using
the “kind” attribute
– Makes it easier to get up and running in certain
scenarios
<endpoint kind ="mexEndpoint" address="mex" />
18. preconfigured Standard endpoints
in v4.0
Standard endpoint name
mexEndpoint
dynamicEndpoint
discoveryEndpoint
udpDiscoveryEndpoint
announcementEndpoint
udpAnnouncementEndpoint
workflowControlEndpoint
webHttpEndpoint
webScriptEndpoint
Description
Defines 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.
Defines 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.
Defines 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.
Defines 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.
Defines 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.
Defines a standard endpoint that is pre-configured for the announcement functionality over a UDP
binding at a multicast address. This endpoint derives from announcementEndpoint.
Defines a standard endpoint for controlling execution of workflow instances (create, run, suspend,
terminate, etc).
Defines a standard endpoint configured with WebHttpBinding and WebHttpBehavior. Use to
expose REST services.
Defines a standard endpoint configured with WebHttpBinding and WebScriptEnablingBehavior.
Use to expose Ajax services.
20. How to choose a Binding
Yes
Yes
Local
Only
No
Inside
Firewall
& .NET
to .NET
No
Yes
No
MSMQ
Client
Support
Legacy?
Need to
Disconnect
Yes
NetTcp
Binding
Yes
No
No
NetMsmq
Binding
NetNamedPipe
Binding
Msmq
Integration
Binding
WsHttp
Binding
BasicHttp
Binding
29. Router Service
• First-class "router" service
– Simply host the RoutingService class
– You host it like any other WCF service
– Configure with routing “filters” to do content-based
routing
30. Hosting the RoutingService
• Additional routing service capabilities
– Protocol 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)
31. Using the Routing Service
1.
2.
Create regular WCF Services to be called by the Routing Service.
Create a Routing Service:
a.
Change the markup in the .svc file to point to the routing Service.
Be sure to reference System.ServiceModel.Routing in your project
b.
In the web.config:
1)
Add endpoints for all the services to which you’ll connect in the <client>
section.
<client>
<endpoint name="CalculatorService1"
address="net.tcp://localhost:8001/servicemodelsamples/calcservice1"
binding="netTcpBinding"
contract="*" />
<endpoint name="CalculatorService2"
address="net.pipe://localhost/servicemodelsamples/calcservice2"
binding="netNamedPipeBinding"
contract="*" />
</client>
32. Using the Routing Service (cont’d)
b.
In the web.config (cont’d):
2)
Create a namespace filter and set the Xpath filterData
3)
Add filterTables to point to the correct end points
4)
Set the Routing behavior to identify the filterTables
35. Improved REST Support
• Many features in the WCF REST Starter Kit are now part of WCF 4.0
Automatic
help page
HTTP
caching
WCF/ASP.NE
T routes
Message
format
selection
REST project
templates
HTTP
“faults”
Various API
extensions
36. Automatic help page
• WCF 4 provides an automatic help page for REST services
– Configure the <webHttp> behavior with helpEnabled=“true”
37. Message format selection
• WCF 4 also provides automatic format selection for XML/JSON
– This feature is built on the HTTP “Accept” headers
<configuration>
<system.serviceModel>
<standardEndpoints>
<webHttpEndpoint>
<!-- the "" standard endpoint is used for auto creating
a web endpoint. -->
<standardEndpoint name="" helpEnabled="true"
automaticFormatSelectionEnabled="true"/>
</webHttpEndpoint>
</standardEndpoints>
</system.serviceModel>
</configuration>
38. WCF and ASP.NET routes
• WCF 4 provides the ability to integrate with the ASP.NET routing
engine
– You implement RegisterRoutes in Global.asax, add ServiceRoute
mappings
– ServiceRoute allows you to map a URL to a WCF 4 service class
• Ultimately this gives you a URL space that maps to multiple WCF
classes
private void RegisterRoutes()
{
WebServiceHostFactory factory = new
WebServiceHostFactory();
RouteTable.Routes.Add(new ServiceRoute("Bookmarks",
factory,
typeof(BookmarkService)));
RouteTable.Routes.Add(new ServiceRoute("Users", factory,
typeof(UserService)));
}
39. REST project templates
• Download the new REST project templates via the new Visual
Studio 2010 Extension Manager (Tools | Extension Manager)
40. •
Summary
WCF/WF 4.0 offers many improvements:
–
–
–
–
–
Simplified configuration
Discovery
Routing service
WebHttp services
Workflow services
• These improvements make WCF simpler and more
flexible
– Today’s common use cases just got easier