How to configure a Port with an SSL Certificate


When creating a self-hosted Windows Communication Foundation (WCF) service with the WSHttpBinding class that uses transport security, you must also configure a port with an X.509 certificate. If you are not creating a self-hosted service, you can host your service on Internet Information Services (IIS). For more information, see HTTP Transport Security.
To configure a port, the tool you use depends on the operating system that is running on your machine.
If you are running Windows Server 2003 or Windows XP, use the HttpCfg.exe tool. With Windows Server 2003 this tool is installed. With Windows XP, you can download the tool at Windows XP Service Pack 2 Support Tools. For more information, see Httpcfg Overview. The Windows Support Tools documentation explains the syntax for the Httpcfg.exe tool.
If you are running Windows Vista, use the Netsh.exe tool that is already installed.
This topic describes how to accomplish several procedures:
  • Determining a computer's current port configuration.

  • Getting a certificate's thumbprint (necessary for the following two procedures).

  • Binding an SSL certificate to a port configuration.

  • Binding an SSL certificate to a port configuration and supporting client certificates.

  • Deleting an SSL certificate from a port number.

Continue reading here...