So you created a certificate request on the SBS wizard and now want to complete the request by running the wizard again and importing the CRT certificate file you received, but you get an error.
The imported certificate does not match your web site
If you look in the detailed logfile named TrustedCert.log located at “C:\program files\Windows Small Business Server\Logs” you may find an error reffering to ASN1bad tag.
An exception of type ‘Type: System.Runtime.InteropServices.COMException, mscorlib, Version=184.108.40.206, Culture=neutral, PublicKeyToken=b77a5c561934e089’ has occurred.
Timestamp: 07/10/2019 11:04:25
Message: CertEnroll::CX509Enrollment::p_InstallResponse: ASN1 bad tag value met. 0x8009310b (ASN: 267)
Stack: at Microsoft.WindowsServerSolutions.CERTENROLLLib.Interop.CX509EnrollmentClass.InstallResponse(InstallResponseRestrictionFlags Restrictions, String strResponse, EncodingType Encoding, String strPassword)
at Microsoft.WindowsServerSolutions.CoreNetworking.CertificateProvider.InstallCertResponse(Byte certificateBytes)
Luckily you can manually import the certificate and restore the necessary private key from the request using the instructions below.
- Open an Microsoft Management Concole (mmc) as admin.
- Add the snap-in “certificates” and select computer account.
- Now go to Personal – Certificates, right click & select all tasks – import.
- Import the CRT file you received from the provider.
- Refresh the certificates list. The certificate is now present but without private key.
- Double-click the certificate, go to the details tab and copy the serial number. Should be something like: 1e 71 cb 7a ….
- Open an CMD with administrator rights and run the following the command: certutil -repairstore my “<serialnumber>”
Where <serialnumber> is the value from step 6, i.e. 1e 71 cb 7a ….
- Refresh the certificate list in the MMC snap-in, the certificate should now show the key icon because the private key is present.
- I suggest you make an export with private key and extended properties to store for safekeeping for later use.
- I tried the import certificate wizard in the SBS console again, selected the CRT file, it still failed, but now the certificate was configured and the OWA was working again with the new certificate.