Skip to main content

New Features in WCF 4

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

Popular posts from this blog

Health Framework - Apple vs Android

In the past few years we have seen mobile and its apps rise and shine transforming many industries in its wake. However, the growth in health and fitness category has been less spectacular at 49% compared to overall mobile app industry which grew at 115% in the year 2013 (source Flurry Analytics). A few years ago Microsoft and Google attempted to make inroads into the health and fitness sector by bringing web based products to store and maintain health and fitness information like MS HealthVault and Google Health with not so spectacular results. Next came innovations by Fitbit in the wearables sector for activity tracking, in 2011 and 2012 they introduced first wireless activity trackers to sync using Bluetooth. This was followed by the entry of Jawbone into health sector with its announcements of Up wristband and accompanying app. These have had better success resulting in many startups joining the wearables product bandwagon.  Late to the stage almos...

Quick notes on Git

  I have been away from writing anything for a long time and instead have been fooling around with other stuffs like just plain reading, growing mustache, trying to learn swimming, trying to learn to play acoustic guitar and trying my hands at photography. To be honest I have not given up on them yet but neither have I been able to hang on to them in a disciplined manner. So here I am back to my writing after a long gap. This time its going to be quick notes on Git . Git is a file repository. As opposed to other repositories like SVN Git thinks of its data more like a snapshot of a mini filesystem. All operations in Git are local. (Entire history of the project is stored locally in your working directory) Browsing project history. Viewing all changes to a file. Git uses Checksum to track repository items Everything in Git is check-summed It uses SHA-1 hash for generating check sum values All a...

Notes on Multi-Threading

1. System.Threading namespace provides classes and interfaces that enable multithreaded programming. 2. How to initiate new Thread?     a. Create an object of a Thread class        i. Argument should not be null        ii. Should have permission to create thread.        b. Its constructor takes an instance of a ThreadStart Class     c. ThreadStart Class requires the method that needs to be run on new thread.     d. Call the Start method of the thread class to initiate execution on this new thread. 3. Important points on Threading –     a. Thread function can be static or non-static     b. You can have multiple threads with same thread function.     c. You should always assign a name to the thread using its Name property. (This was pointed out to me by Kalyan Krishna. He said it invaluable...