Search code examples
c#wcfwcf-security

Securing WCF Services


I have WCF services hosted on a console application and a web application accessing its operations. I have searched for WCF security and in most cases the web services were hosted on IIS. What points should I follow in order to implement WCF transport layer security in my case?

What I want is

  1. Using username and password to execute WCF operations
  2. Use SSL to encrypt data.

If my WCF services are hosted on a console application. Are there any IIS configurations that I should make?


Solution

  • If your WCF Services are hosted in a console app, IIS has nothing to do with them, so you don't need to configure IIS or anything.

    In order to have transport-layer security, you can use WsHttp or NetTcp binding in combination with SSL.

    Have a look at http://www.dotnetspark.com/kb/1502-security-wcf--transport-level.aspx, http://www.packtpub.com/article/microsoft-wcf-security and http://dotnetrobert.com/?q=node/140.