Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Unable to use the SDK in an MVC Application (.net framework 4.5.2) #33
The code below works well when running in a console app. But it ends up in an exception when the same code gets executed in an MVC app. The message states ,that the "file" doesn't exist, which file is it referring to?
SafeNativeMethods.IpcInitialize(); SafeNativeMethods.IpcSetAPIMode(APIMode.Server); var tempFile = "C:\\Users\\vikjon03\\source\\repos\\somewher\\bild.jpg"; var fileExists = File.Exists(tempFile); // this variable is set to true when debugging Stream inStream = File.OpenRead(tempFile); Stream outStream = new MemoryStream(); SafeFileApiNativeMethods.IpcfEncryptFileStream( // this method call triggers the exception inStream, tempFile, RmsTemplateId, SafeFileApiNativeMethods.EncryptFlags.IPCF_EF_FLAG_KEY_NO_PERSIST, ref outStream );
Exception (for some reason translated to swedish?)