Rory Primrose

Learn from my mistakes, you don't have time to make them yourself

View project on GitHub

Refreshing an expired STSTestCert WIF certificate

Posted on January 29, 2012

I have been using WIF for the last couple of years on a few of my projects and the STSTestCert gets a bit of a workout on my development machines. This certificate is only valid for 12 months. All the applications that use this test certificate will fail to execute authentication requests once this certificate has expired.

Here is the easiest way to renew the certificate.

  1. Open up MMC and attach the Certificate Manager plugin for the local machine.
  2. Navigate to Certificates (Local Computer) -> Personal -> Certificates.
  3. Select and delete the expired STSTestCert certificate.
  4. Open VS with elevated rights
  5. Add a new solution
  6. Add a new STS project to that solution using the Tools -> Add STS Reference… menu item
  7. Continue through the wizard
  8. Refresh the MMC console and you should now have a fresh STSTestCert

image