When deploying solutions that contains a Security Token Service (STS) you will probably have to set the security properties of the private key of the certificates that are used to sign and encrypt the messages. It can be very difficult to find the file though, but luckily there is a resource tool for this specific purpose that can be downloaded at http://go.microsoft.com/fwlink/?linkid=20506. After installing the tool on server the following command can be used to set the security properties.
WinHttpCertCfg.exe -g -c LOCAL_MACHINE\MY -s "WSE2QuickStartServer" -a "MYMACHINE\NetworkService"
The c parameter is followed by the certificate store, s should be followed by the name of the certificate and finally a is the account to allow using the certificate.