如何将文件保存到网络中的另一台计算机? [英] How do I save file to another computer which is in network ?
本文介绍了如何将文件保存到网络中的另一台计算机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
访问路径//172.20.2.50/sharedfolder/被拒绝。
而172.20.2.50是同一台PC中的IP网络,我想存储我的文件....
Plz帮助我...
我尝试过什么:
Access to the path //172.20.2.50/sharedfolder/ is denied.
whereas, 172.20.2.50 is the IP of the other PC that is in same network, where i want to store my File....
Plz help me ...
What I have tried:
<pre>protected void btnUpload_Click(object sender, EventArgs e)
{
if (FileUpload1.HasFile)
{
filename = FileUpload1.PostedFile.FileName;
string filepathfb = "////172.20.2.50//sharedfolder//" + filename;
FileUpload1.SaveAs(filepathfb);
推荐答案
它被拒绝,因为远程计算机没有设置权限允许你(网络服务器上的用户,可能是IIS登录而不是真正的用户)将文件写入该文件夹。
检查权限该文件夹,或者如果您经常这样做,请将驱动器号连接到共享文件夹(提供相应的登录详细信息)并直接保存到该磁盘,而不是每次都依赖于IP地址。
It's denied because the remote computer doesn't set permissions allowing you (the user on the webserver, which is probably an IIS login rather than a "real" user) to write files to that folder.
Check the permissions on the folder, or if you are doing this often, connect a drive letter to the shared folder (supplying the appropriate login details) and save direct to that disk instead of relying on the IP address each time.
这篇关于如何将文件保存到网络中的另一台计算机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文