简体   繁体   English

访问密码保护的共享网络

[英]Access password protected shared network

How to read/write files in a shared network drive? 如何在共享网络驱动器中读取/写入文件?

I am creating an application to upload files to the password protected shared network drive. 我正在创建一个应用程序,用于将文件上传到受密码保护的共享网络驱动器。 When I run locally, the files are uploaded well. 当我在本地运行时,文件上传良好。 But, in the publish environment it throws: 但是,在发布环境中会引发:

Access to the Path '/shared network drive/' is denied 拒绝访问路径“ /共享网络驱动器/”

How to resolve this ? 如何解决呢?

Two ways: 两种方式:

1) Create a network drive connection to the remote machine (so it appears to your computer as "X:" for example) and save to that. 1)创建到远程计算机的网络驱动器连接(例如,它在您的计算机上显示为“ X:”)并保存到该计算机。

2) Use the full UNC path specification: //RemoteMachineName/SharedFolder/foldername 2)使用完整的UNC路径规范:// RemoteMachineName / SharedFolder / foldername

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

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