1. New features in WCF4
a. Simplified configuration
b. Discovery
c. Routing Service
d. WCF WebHttp Services
e. Workflow Services
f. Advanced Features
2. WCF 3.x required at least one endpoint to be defined. WCF 4 comes with a default endpoint for each address/contract.
3. The moment you configure even a single endpoint for your service all the default endpoint will disappear.
4. You could also further add default endpoints in code after configuring your custom endpoints using AddDefaultEndpoints().
5. To modify default behaviors simply add a behavior and do not give any name to it.
6. We no longer need .svc files and instead use the configuration as follows
a. System.serviceModel/serviceHostingEnvironment/serviceActivations/Add
<add relativeAddress=”Greeting.svc” Service=”GreetingService” />
7. There are two types of Service Discovery
a. Adhoc – within local subnet (LAN) using UDP
b. Managed – outside but managed network using discovery proxy.
8. Also there are two scenarios –
a. Service comes up and announces over UDP, Client comes up and searches for the endpoint for the services, finds it and uses it.
b. Client is already up, Service comes up and announces itself, Client gets a notification of these announcements and uses it.
9. ManagedDiscoveryBase class can be used for implementing a managed service discovery for outside LAN scenarios.
10. Routing Service Capabilities include –
a. Protocol bridging (Client talks to Routing service over http and Routing service to actual service over tcp / named pipes)
b. Error handling (router can be configured with backup endpoints)
c. Multi-cast routing (router sends to multiple endpoints)
11. WCF Rest Starter kit is not WCF WebHttp Services in WCF 4
12. WebHttp now provides –
a. Automatic help page like a SOAP description page we now have one for REST Services.
b. Full support for HTTP Caching
c. Message format selection – so we can easily choose xml or json.
d. HTTP Faults – to send out http error/status codes instead of just the faults using WebFaultException.
e. Add support for routing
f. New REST Project templates
13. To enable Automatic help and format selections
a. User system.servicemodel/standardendpoints/webhttpendpoint/
StandardEndpoint with helpEnabled = true and automaticFormatSelectionEnabled = true
14. WebHttp uses following verbs whose semantics should not be changed –
a. GET with ID
b. GET for all
c. POST for Add
d. DELETE for delete
e. PUT for update
Comments