Some time ago I posted a sample which shows how to sign large CMS data by calling CryptMsg API directly (How to call CryptMsg API in streaming mode (C#)) and that way overcome the current limitations of SignedCms in .NET (“ASN1 value too large” error when calling SignedCms.ComputeSignature).
I continued working on the sample and extended it quite a lot. Current version implements SignedLargeCMS and EnvelopedLargeCMS, my own version of SignedCms and EnvelopedCMS to work with large data.
I hope this helps.
Alex (Alejandro Campos Magencio)