将文件上传到FTP服务器时发生错误 [英] Error Occurs when uploading a file to FTP server

查看:130
本文介绍了将文件上传到FTP服务器时发生错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在尝试将文件上传到FTP服务器(GoDaddy服务器)...
我使用了以下代码...


Hi All,

I am trying to upload a file into FTP server(GoDaddy Server)...
I used the following code...


Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpload.Click
    Try
        Dim filePath As String = "~/"
        Dim fileName As String = fileUpload.FileName.ToString()
        fileUpload.SaveAs(Server.MapPath(filePath) & fileName)
        ErrorMessage.Text = "Uploaded Successfully :)"
    Catch ex As Exception
        ErrorMessage.Text = ex.Message.ToString()
    End Try




我收到类似..
的错误 拒绝访问路径``D:\ Hosting \ 8064208 \ html \ csv.jpg''.

在我的本地系统中,我不喜欢上一行中提到的路径...它显示为默认

我无法解决此问题

请任何人..




I got the error like..
Access to the path ''D:\Hosting\8064208\html\csv.jpg'' is denied.

Here in my local system i didn''t have like such path as mentioned in the above line...It showing as default

I cannot able to solve this issue

Could any one please..

推荐答案

您的ASP.Net用户(您托管网页的用户)没有访问您尝试的图像的权限.进行访问.
Your ASP.Net user (the one you are hosting your web page with), does not have access to the image you are trying to access.


这篇关于将文件上传到FTP服务器时发生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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