从 ASP.NET 页面分离命令行进程
我在服务器上托管了一个网页,在服务器的文件系统上有一个 zip 文件。该页面正在使用一些参数(zip 文件的位置和解压缩的目标文件夹)来分离 7zip 进程,但当然,它似乎引发了权限问题。对于存档中的每个文件,我都会收到“无法打开文件[文件名]”。我尝试了 Windows 身份验证并使用用户名和密码运行该进程,但没有任何效果正常。从安全角度来看,在服务器上解压缩文件的最佳方法是什么?理想情况下,我还希望驱动此事件,以便文件一到达服务器就解压缩(这是我请求页面时)。欢迎其他解决方案,但首选简单/轻量级解决方案。
谢谢
I have a web page hosted on the server and a zip file on the server's file system. The page is spinning off the 7zip process with some arguments (location of the zip file and destination folder for unzipping) but it seems to raise permission issues, of course. For each file in the archive I get "Can not open file [filename]". I tried windows authentication and running the process with a username and password but nothing worked properly. What would be the best way for unzipping the file on the server from security point of view? Ideally, I would also like to have this event driven so the file is unzipped as soon as it arrives on the server (this is when I request the page). Other solutions are welcome but simplicity/lightweight solution is preferred.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用开放或闭源 zip 库之一
,例如:
http://dotnetzip.codeplex.com/ 或
http://www.sharpdevelop.net/OpenSource/SharpZipLib/
Use one of an open or closed source zip library
e.g.:
http://dotnetzip.codeplex.com/ or
http://www.sharpdevelop.net/OpenSource/SharpZipLib/