Information Card in WCF

In this article you will learn how to develop an Information Card and add it to a WCF application.

WCF Application having Information Card

As we are using DerivativesCalculator sample to enhance the WCF application hence we can use it in very interesting way to add an Information Card to a WCF application. It provide more benefits than CardSpace.

Benefits of adding Information Card : 

  • Authentication

  • Authorization

  • Reduce IT pain

  • Granting trust to domains

  • Helps in maintaining security

Sample Code : To show the usage of DerivativesCalculator which help in adding Information card which require no external reference to do so.


But when we are using it as a service than we require reference to add this as a service that can be DerivativesCalculatorService and the reference require for this purpose can be System.ServiceModel and the DerivativesCalculator which we have made earlier.

Sample Code :


Now the next step will be Hosting which is the basic requirement to use WCF Services. For this purpose references required are System.ServiceModel, and the DerivativesCalculatorService (Which are developed in above step).

Sample  Code :


Now at last it requires configuration that can be done in App.config page.

Sample Code :


After configuration at last add the Information Card to the WCF application by using Binding i.e. wsHttpBinding


In the last follow these steps to run your application of adding Information Card to WCF application.

Build the entire solution, run the host (right-click, Debug, Start New Instance).