Tuesday, January 31, 2012

MakeCert Error: Too many parameters

I was just reading this MSDN post on creating a self-signed certificate for use with ADFS: http://msdn.microsoft.com/en-us/library/bfsktky3.aspx

The command I need, looks like the following:

Makecert -r 
-n CN="www.example.com" 
-b 05/10/2010 
-e 12/22/2011 
-ss my 
-sr localmachine 
-sky exchange 
-sp "Microsoft RSA SChannel Cryptographic Provider" 
-sy 12  

If you copy the sample command from the MSDN page above and run it via the command-line, you'll get error "Too many parameters". It turns out the dash used in the MSDN post above is actually character: \u2013 (DASH-EN) and not minus \u002D and it's the minus character that the tool is expecting.

So to make this work, simply replace the hyphen with the minus sign when keying in the command as defined above. In the above sample, I have replaced the incorrect character with the correct one so feel free to just copy and paste it.

I learned this from here http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/1e41910f-2f89-439c-93a6-57e5c391d7ca/

Thanks to Carlos Figueira for finding this.

1 comment:

Anonymous said...

F***** awsome , save a lot of time... I think someone should tell MS t change on its page...