调用时:
Check(NativeMethods.CryptAcquireContextW(
out providerContext,
containerName,
null,
1, // PROV_RSA_FULL
8)); // CRYPT_NEWKEYSET
我明白了:
该系统找不到指定的文件。(来自 HRESULT 的异常:0x80070002):堆栈跟踪:在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) 在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
它似乎类似于这个 http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/feaf03f7-51a8-48d6-825f-e04c4ff2ef3a