繁体   English   中英

从IIS上的网站访问NAS

[英]Access NAS from web site on IIS

我在Windows Server 2003上安装了网站,并且有NAS,我需要在其中保存一些文件。 这些文件是从我映射NAS的站点上传的,我为该NAS传递了一封信。

我已经将该站点配置为使用本地用户和域用户,但是,当我尝试上传文件时,出现以下错误:

Could not find a part of the path  E:/file.pdf .
    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
    at System.IO.FileStream..ctor(String path, FileMode mode)
    at System.Web.HttpPostedFile.SaveAs(String filename)
    at System.Web.UI.WebControls.FileUpload.SaveAs(String filename)
    at registro_reg_otra_informacion.btn_subir_archivo_Click(Object sender, EventArgs e)

希望能对我有所帮助,谢谢!

在IIS 6中通过ASP.NET访问映射的网络驱动器

...通过映射的驱动器号访问驱动器的方法很不容易,可能是重定向层,因为邪恶的人可能会重新驱动器。 访问网络共享的首选方法是通过UNC ...

http://www.hanselman.com/blog/AccessingMappedNetworkDrivesViaASPNETInIIS6.aspx

我建议将上载的文件保存到IIS服务器中的临时目录中,然后使用FileSystemWatcher将文件从IIS服务器移至NAS。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM