bu hui zhi hui web shang chuang

解决方案 »

  1.   

    http://www.yitian130.com/article.asp?id=139
      

  2.   

    FileInfo fileInf = new FileInfo(System.Environment.UserName + ".txt");
                string Url = ftp的URL+文件名
                FtpWebRequest reqFtp;            reqFtp = (FtpWebRequest)FtpWebRequest.Create(new Uri(Url));            reqFtp.Credentials = new NetworkCredential(ftp的用户名,ftp密码);            reqFtp.KeepAlive = false;            reqFtp.Method=WebRequestMethods.Ftp.UploadFile;            reqFtp.UseBinary = true;            reqFtp.UsePassive = false;
                reqFtp.ContentLength = fileInf.Length;            int buffLength = 2048;            byte[] buff = new byte[buffLength];
                int contentLen;            FileStream fs=fileInf.OpenRead();            try{
                    Stream strm = reqFtp.GetRequestStream();                contentLen = fs.Read(buff,0,buffLength);                while (contentLen != 0) 
                    {
                        strm.Write(buff, 0, contentLen);
                        contentLen = fs.Read(buff, 0, buffLength);
                    }
                    strm.Close();
                    fs.Close();
                    //fileInf.Delete();
                }
      

  3.   

    wuhq030710914 
    http://www.yitian130.com/article.asp?id=139
    太乱了啊!什么都看不出来啊!小弟比较菜
      

  4.   

    我给你贴上了 这是在ftp上没有文件的情况下上传
      

  5.   

    请求的 URI 对于此 FTP 命令无效。
    这是什么错误?
      

  6.   

    http://www.baidu.com/s?wd=asp+ftp%C9%CF%B4%AB%B4%FA%C2%EB&cl=3
      

  7.   

    要完全的URL的地址
    比如
    ftp:\\网页名字
      

  8.   

    对的如果你输入的是 完整路径
    还是你说的那个错误 你用DOS
    ping一下服务器  看看连上了吗
      

  9.   

    http://sourceforge.net/projects/ftpnet/很实用
      

  10.   

    用VB.Net 2005里的My.Computer已经有FTP的功能了。
      

  11.   

    请求的 URI 对于此 FTP 命令无效。 
    这是什么错误?答: 我测试的时候,先把所有的连接到FTP的窗口全部关闭掉,才不会出现这个异常.
    而如果有一个帐号先连着FTP,则调试程序的时候总出现"请求的 URI 对于此 FTP 命令无效。"这个异常.网上找了半天没答案,现在写出来,供参考.