Thursday 22 October 2009

Error: CryptCertStrToNameW failed => 0x80092023 (-2146885597)

I was following a guide today on WCF and using makecert to create self signed certificates e.g. makecert –n "CN-FakeRootCA” –r –sv FakeRootCA.pvk FakeRootCA.cer

Whenever I tried to create the certificate, I got the error
Error: CryptCertStrToNameW failed => 0x80092023 (-2146885597)

The reason for this was the version of makecert being used was an old version. Even though I was running it from the visual studio 2008 command prompt, the environment mappings were causing it to run version 5.1, instead of version 6.

Using windows search I found that the latest version is at:
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin

So you can either makecert from this directory, or alter you path variables.

9 comments:

  1. Thanks! This solved the problem for me too.

    ReplyDelete
  2. I had a similar issue with the Windows SDK 7.0a on a 64 bit machine. After much searching and trying, I found my own problem to be I was enclosing the subject name with commas, when there was no whitespace in my subject name. So, -n "CN=Server" is incorrect... it should simply be -n CN=Server.

    ReplyDelete
  3. Thanks Sean! You saved a lot of my time.

    ReplyDelete