WCF Tutorial
www.Learn2Expert.net A new ASP.Net MVC 4, SSIS, Interview Q/A tutorial - Visit - www.Learn2Expert.net
Skip Navigation LinksHomeWCF SecurityMessage Security Level No of Views: 60677

Message Security Level

This article explains about the how to configure the service with Message security settings and what are the client credential available for this mode.

When configure transfer security for Message security, not all bindings support all client credential type

Below table list client credential for different binding

Name None Windows Username Certificate Issued token
BasicHttpBinding No No No Yes No
NetTcpBinding Yes Yes(default) Yes Yes Yes
NetNamedPipeBinding N/A N/A N/A N/A N/A
WsHttpBinding Yes Yes(default) Yes Yes Yes
WsDualHttpBinding Yes Yes(default) Yes Yes Yes
NetMsmqHttpBinding Yes Yes(default) Yes Yes Yes

Below diagram explain about how set the client credential in configuration file

Transport Protectionlevel

Tips!

  • Always create the service with Interface->Implementation format, mention the contract in Interface.
  • Define the service in Class library and refer the class library in Host project. Don’t use service class in host project.
  • Change the instance mode to per call as default.
  • Always catch exception using try/catch block and throw exception using FaultException < T >.
  • Logging and Include exception should be enable while compiling the project in debug mode. While in production deployment disable the logging and Include exception details.