Original URL: | https://blogs.msdn.microsoft.com/alejacma/2009/09/30/x509certificate-creates-temporary-files-which-are-never-deleted/ |
Post name: | X509Certificate creates temporary files which are never deleted |
Original author: | Alejandro Campos Magencio |
Posting date: | 2009-09-30T04:52:00+00:00 |
Hi all,
When creating an X509Certificate object inyour .NET application ("X509Certificate cert = new X509Certificate(certBytes);") you may see that two 0kb files are created in the Temp folder of your Windows Server 2003, and are never deleted. After creating many of those objects the Temp folder fills up and the app won't function properly.
The cause of this issue is the following bug:
X509Certificate class uses CryptQueryObject API behind the scenes. Fortunatelly there is a fix for this referenced on the link above.
I hope this helps.
Regards,
Alex (Alejandro Campos Magencio)
Comments: