Security Exception: The system cannot find the file specified.
This error ocurrs when you have generated a certificate file and use .NET processor to read it into an X509Certificate2 object.

X509Certificate2 object is generated from a .pfx file, the CryptoAPI generates a random key container for the certificate. When a partially trusted assemble try to access the PrivateKey or PublicKey properties of a System.Security.Cryptography.X509Certificate2 object on the computer. a KeyContainerPermission demand is generated. However, partially trusted code does not have KeyContainer permission. Therefore, the "security exception" error message occurs.
Microsoft has a hotfix on this. It is KB number: 915980. This hotfix is not tested, which means the hotfix may not fix the problem. .NET Framework 2.0 Service Pack 2 is supposed to fix this issue. It hasn’t been release yet.
So how do we deal with this problem? To me there currently no solution unless you find another way to work it out. One way I find is to store the certificate in the system certificate store instead of read it from a file.