Welcome to WindowsClient.net | Sign in | Join

Zuker On Foundations

The realm of .NET (WPF, WCF and all around)

WCF - Creating a certificate

I implemented a Security Token Service in WCF as part of our WS-Trust solution here in our project.

I needed a certificate to apply the message security and all that WS-Federation requires.
I needed to set it up quickly for a temporary purpose, thus I created a certificate using 'makecert.exe' (accessible through VS2008 Command Prompt).

One of the valid set of arguments to create a certificate for such use is:
makecert.exe -sr LocalMachine -ss My -a sha1 -n CN=WCFCert2 -sky exchange -pe

You can change the store name / location and certificate name as you like.

I'll end by saying that using such certificates in production is not recomended.
The best thing to do is to get a chain-trusted certificate for your STS and services.

One additional thing - in order to add a certificate to the trusted people store execute the following:
certmgr.exe -add -r LocalMachine -s My -c -n localhost -r CurrentUser -s TrustedPeople

Posted: Jun 29 2008, 07:38 AM by zuker | with 1 comment(s)
Filed under: ,

Comments

Jimmy said:

Thanks for the tip.

# August 1, 2008 12:25 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

Page view counter