CryptoAPI and DPAPI are not thread-safe :-( !
Today, while stress-testing a Web Application of a customer of mine, I discovered an issue in a piece of code working with DPAPI: CryptoAPI are not thread-safe!
As my friend and colleague Marco discovered through this Microsoft newsgroup post it's an issue "by design".
So, in order to avoid this problem, I had to review my code (originally based on MSDN DPAPI C# sample library) in order to provide a synchronization logic by myself.
The problem doesn't matter situations in which you use DPAPI just to protect gobal one-time-read informations like connection string and process impersonation identities, even if I suggest you to acquire a lock on resources before accessing them. On the other side it becomes an annoying issue if you use DPAPI intensively and with multiple threads, like in my application.