如何将图像保存到网络中的另一台计算机? [英] How Do I Save Image To Another Computer Which Is In Network?

查看:94
本文介绍了如何将图像保存到网络中的另一台计算机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误:

Quote:

SaveAs方法配置为需要有根路径,路径' 192.168.1.9//E:/​​/pranav//nokia.jpg'没有根。





我的COde:



 受保护  void  btnUpload_Click(< span class =code-keyword> object  sender,EventArgs e)
{
if (FileUpload1.HasFile)
{

filename = FileUpload1.PostedFile.FileName;

string filepathfb = 192.168.1.9//E:/​​/pranav// + filename;

FileUpload1.SaveAs(filepathfb);





而192.168.1.9是另一台PC的IP我要存储我的图像....

帮助.. !!

解决方案

两种方式:

1)创建与远程计算机的网络驱动器连接(例如,它在您的计算机上显示为X:)并保存到该处。

2)使用完整的UNC路径规范: // RemoteMachineName / SharedFolder / pranav

ERROR:

Quote:

The SaveAs method is configured to require a rooted path, and the path '192.168.1.9//E://pranav//nokia.jpg' is not rooted.



My COde:

protected void btnUpload_Click(object sender, EventArgs e)
    {
        if (FileUpload1.HasFile)
        {

            filename = FileUpload1.PostedFile.FileName;
            
            string filepathfb = "192.168.1.9//E://pranav//" + filename;

            FileUpload1.SaveAs(filepathfb);



whereas, 192.168.1.9 is the IP of the other PC where i want to store my image....
Help..!!

解决方案

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.
2) Use the full UNC path specification: //RemoteMachineName/SharedFolder/pranav


这篇关于如何将图像保存到网络中的另一台计算机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆