MSMQ messages using HTTP just won't get delivered #12
Here's a solution discovered by my colleague Andreas Naranjo which is worth adding to my long-running "MSMQ messages using HTTP just won't get delivered" series.
When trying to send an MSMQ HTTPS message from a Windows Server 2003 machine to another, the messages are stuck in the sender's Outgoing queue and the queue status says "Waiting to Connect." HTTP messages go through just fine but HTTPS messages are stuck.
The problem can be with the Root Certificate Authority (CA) not being installed and trusted on the sending machine. For example, the server certificate on the receiver is generated by an internal certificate server, not a known third party certification authority, and so the sending machine does not trust the receiving server's certificate.
To correct this problem, install the Root CA on the receiving server by:
Add CA to the Trusted Root Certification Authorities
- Go to https://CertServer/certsrv.
- Select the Download a CA certificate, Certificate chain, or CRL link.
- In the Download a CA certificate, Certificate chain, or CRL dialog box, select Install this CA certificate chain.
The CA certificate chain has now been successfully installed for the logged-on user. - Start MMC, and then add the Certificates snap-in for My user account and Computer Account (Local Computer).
- Expand Console RootCertificates - (Local Computer)Trusted Root Certification AuthoritiesCertificates.
- Expand Console RootCertificates - Current UserTrusted Root Certification AuthoritiesCertificates.
- Drag CertServer CA from Current User to (Local Computer).
The CertServer CA Authority is now trusted for all logged-on users
You then need to export this root CA from the receiving machine by:
Export the trusted CA to Sender
- Start MMC.
- On the File menu, select Add/Remove Snap-in.
- In Add/Remove Snap-in dialog box, select Add.
- In the Available Standalone Snap-ins dialog box, highlight Certificates.
- Click Add.
- Select Computer account.
- In the Select Computer dialog box, select Local computer: (The computer this console is running on).
- Click Finish.
- Close the Add Standalone Snap-in dialog box.
- In the Add/Remove Snap-in dialog box, click OK.
- Expand Console RootCertficates (Local Computer)Trusted Root Certification Authorities)Certificates.
- Select the CA authority that you would like to export.
- Right-click, and then select All TaskExport.
- In the Certificate Export wizard, select DER encoded binary X.509 (.CER) format.
- Specify the file name and location.
Finally, you need to import the Root CA from the receiver to the Sender:
Import certificates on Sender
- Copy the x.509 certificate to Sender.
- Start MMC.
- On the File menu, select Add/Remove Snap-in.
- In the Add/Remove Snap-in dialog box, select Add.
- In the Available Standalone Snap-ins dialog box, highlight Certificates.
- Click Add.
- Select Computer account.
- In the Select Computer dialog box, select Local computer: (The computer this console is running on).
- Click Finish.
- Close the Add Standalone Snap-in dialog box.
- In the Add/Remove Snap-in dialog box, click OK.
- Expand Console RootCertificates - (Local Computer)Trusted Root Certification AuthoritiesCertificates.
- Right-click Certificates, and then select All Tasks, Import.
- In the Import Certificate wizard:
- Specify the certificate file.
- Select Place all certificates in the following store: Trusted Root Certification Authorities.
This procedure, is also described in the Microsoft MSMQ HTTP Messaging white paper: