This link will provide the best guide: CodeProject
All URL-s below will give more information.
If you want to use https between the client and the server you have to use the following command to generate the certificate:
makecert -n “CN=TempCA” -sky exchange -pe -r -sv TempCa.pvk TempCA.cer
Then you can import the certificate.
If your WCF service is self-hosted you also have to perform the steps in this MSDN article.
Instead of running httpcfg set urlacl, which requires knowledge of the security description language , use the HttpConfigManager tool.
There’s a good forum post describing the steps to generate the self-signed certificates at Microsoft Forums.