如何从 MemoryStream 创建磁盘 (VB.net)
我正在 VB.Net (2010) 中开发一个项目,从文档管理系统中提取文件。
文件驻留在网络上,有关文件的信息位于 SQL 2005 数据库中,并已使用加密流 (System.Security.Cryptography.RijndaelManaged) 进行加密
我已检索该文件并解密它们,但我正在尝试了解如何将流写回文件。我知道文件类型(存储在 SQL DB 中),但
我在任何 VB 文件或 MS 站点中都找不到解决方案。
任何帮助将不胜感激。
I'm working on a project in VB.Net (2010) where I'm extracting files from an Document Management System.
The Files reside on the network, and information about the files are in a SQL 2005 Database and have been encrypted with the Encryption Stream (System.Security.Cryptography.RijndaelManaged)
I have retrieved the file, and decrypted them, but I'm trying to find out how to write the stream back to a file. I know the file type (which is stored in a SQL DB)
I can't find a solution in any of the VB files or the MS site.
Any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要将
MemoryStream
写入文件,只需使用WriteTo
方法。To write a
MemoryStream
to a file just use theWriteTo
method.选项 1(显而易见)是在磁盘上创建临时文件。
选项 2 是采用类似于我们的回调文件系统产品,它可以让您准确地执行您需要的操作,并且我们的许多客户将其用于像您这样的场景,即表示从文档管理系统和类似存储中获取的数据。
Option 1 (obvious) is to create a temporary file on the disk.
Option 2 is to take something like our Callback File System product, which lets you do exactly what you need and many of our customers use it for scenarios like yours, i.e. represent data taken from document management systems and similar storages.