當前位置:首頁 » 文件管理 » net2ftp

net2ftp

發布時間: 2022-01-12 09:21:24

『壹』 c#ftp文件夾改名

看msdn文檔吧,有例子,又是中文的。想深入一點的話就用一個網路監控軟體,如iris,看看tcp包和別人的客戶端軟體發出的有何不同,這實際上就是對ftp協議的一個認識。

1、How To Use FTPWebRequest
http://social.msdn.microsoft.com/forums/en-US/netfxnetcom/thread/17a3abbc-6144-433b-aadd-1f776c042bd5/

2、FTPWebRequest.RenameTo Error in .NET v4.0 這篇最適合你了
http://social.msdn.microsoft.com/Forums/en-US/netfxnetcom/thread/0e5718a4-8b26-4bc4-b9e6-c4faebfc66ae

『貳』 VB.net連接FTP操作

MSDN上的,看看對你有沒有幫助。GOOD LUCK!

Imports System.Net
Imports System.IO

Mole FtpSample

Sub Main(ByVal args() As String)
If args.Length = 0 OrElse args(0).Equals("/?") Then
DisplayUsage()
ElseIf args.Length = 1 Then
Download(args(0))
ElseIf args.Length = 2 Then
If args(0).Equals("/list") Then
List(args(1))
Else
Upload(args(0), args(1))
End If
Else
Console.WriteLine("Unrecognized argument.")
End If
End Sub

Private Sub DisplayUsage()
Console.WriteLine("USAGE:")
Console.WriteLine(" FtpSample [/? | <FTP download URL> | <local file>")
Console.WriteLine(" <FTP upload URL> | /list <FTP list URL>]")
Console.WriteLine()
Console.WriteLine("where")
Console.WriteLine(" FTP download URL URL of a file to download from an FTP server.")
Console.WriteLine(" FTP upload URL Location on a FTP server to upload a file to.")
Console.WriteLine(" FTP list URL Location on a FTP server to list the contents of.")
Console.WriteLine(" local file A local file to upload to an FTP server.")
Console.WriteLine()
Console.WriteLine(" Options:")
Console.WriteLine(" /? Display this help message.")
Console.WriteLine(" /list Specifies the list command.")
Console.WriteLine()
Console.WriteLine("EXAMPLES:")
Console.WriteLine(" Download a file FtpSample ftp://myserver/download.txt")
Console.WriteLine(" Upload a file FtpSample upload.txt ftp://myserver/upload.txt")
End Sub

Private Sub Download(ByVal downloadUrl As String)
Dim responseStream As Stream = Nothing
Dim fileStream As FileStream = Nothing
Dim reader As StreamReader = Nothing
Try
Dim downloadRequest As FtpWebRequest = _
WebRequest.Create(downloadUrl)
Dim downloadResponse As FtpWebResponse = _
downloadRequest.GetResponse()
responseStream = downloadResponse.GetResponseStream()

Dim fileName As String = _
Path.GetFileName(downloadRequest.RequestUri.AbsolutePath)

If fileName.Length = 0 Then
reader = New StreamReader(responseStream)
Console.WriteLine(reader.ReadToEnd())
Else
fileStream = File.Create(fileName)
Dim buffer(1024) As Byte
Dim bytesRead As Integer
While True
bytesRead = responseStream.Read(buffer, 0, buffer.Length)
If bytesRead = 0 Then
Exit While
End If
fileStream.Write(buffer, 0, bytesRead)
End While
End If
Console.WriteLine("Download complete.")
Catch ex As UriFormatException
Console.WriteLine(ex.Message)
Catch ex As WebException
Console.WriteLine(ex.Message)
Catch ex As IOException
Console.WriteLine(ex.Message)
Finally
If reader IsNot Nothing Then
reader.Close()
ElseIf responseStream IsNot Nothing Then
responseStream.Close()
End If
If fileStream IsNot Nothing Then
fileStream.Close()
End If
End Try
End Sub

Private Sub Upload(ByVal fileName As String, ByVal uploadUrl As String)
Dim requestStream As Stream = Nothing
Dim fileStream As FileStream = Nothing
Dim uploadResponse As FtpWebResponse = Nothing
Try
Dim uploadRequest As FtpWebRequest = WebRequest.Create(uploadUrl)
uploadRequest.Method = WebRequestMethods.Ftp.UploadFile

' UploadFile is not supported through an Http proxy
' so we disable the proxy for this request.
uploadRequest.Proxy = Nothing

requestStream = uploadRequest.GetRequestStream()
fileStream = File.Open(fileName, FileMode.Open)

Dim buffer(1024) As Byte
Dim bytesRead As Integer
While True
bytesRead = fileStream.Read(buffer, 0, buffer.Length)
If bytesRead = 0 Then
Exit While
End If
requestStream.Write(buffer, 0, bytesRead)
End While

' The request stream must be closed before getting the response.
requestStream.Close()

uploadResponse = uploadRequest.GetResponse()
Console.WriteLine("Upload complete.")
Catch ex As UriFormatException
Console.WriteLine(ex.Message)
Catch ex As IOException
Console.WriteLine(ex.Message)
Catch ex As WebException
Console.WriteLine(ex.Message)
Finally
If uploadResponse IsNot Nothing Then
uploadResponse.Close()
End If
If fileStream IsNot Nothing Then
fileStream.Close()
End If
If requestStream IsNot Nothing Then
requestStream.Close()
End If
End Try
End Sub

Private Sub List(ByVal listUrl As String)
Dim reader As StreamReader = Nothing
Try
Dim listRequest As FtpWebRequest = WebRequest.Create(listUrl)
listRequest.Method = WebRequestMethods.Ftp.ListDirectoryDetails
Dim listResponse As FtpWebResponse = listRequest.GetResponse()
reader = New StreamReader(listResponse.GetResponseStream())
Console.WriteLine(reader.ReadToEnd())
Console.WriteLine("List complete.")
Catch ex As UriFormatException
Console.WriteLine(ex.Message)
Catch ex As WebException
Console.WriteLine(ex.Message)
Finally
If reader IsNot Nothing Then
reader.Close()
End If
End Try
End Sub

End Mole

可以通過設置 Credentials 屬性來指定用於連接伺服器的憑據,也可以將它們包含在傳遞給 Create 方法的 URI 的 UserInfo 部分中。

從 FTP 伺服器下載文件時,如果命令成功,所請求的文件的內容即在響應對象的流中。通過調用 GetResponseStream 方法,可以訪問此流。

如果使用 FtpWebRequest 對象向伺服器上載文件,則必須將文件內容寫入請求流,請求流是通過調用 GetRequestStream 方法或其非同步對應方法(BeginGetRequestStream 和 EndGetRequestStream 方法)獲取的。必須寫入流並在發送請求之前關閉該流。

請求是通過調用 GetResponse 方法或其非同步對應方法(BeginGetResponse 和 EndGetResponse 方法)發送到伺服器的。請求的操作完成時,會返回一個 FtpWebResponse 對象。FtpWebResponse 對象提供操作的狀態以及從伺服器下載的所有數據。

『叄』 kodexplorer怎樣部署

一、經典和可遠程FTP-Net2FTP安裝與使用
1、Net2FTP官網:
1、官方網站:http://www.net2ftp.com/
2、下載地址:Net2FTP下載
2、直接下載Net2FTP程序包,解壓然後上傳到空間上,用瀏覽器打開Net2FTP路徑,就可以訪問Net2FTP了。輸入你的FTP伺服器賬號和密碼就可以登錄Net2FTP管理空間的文件了。(點擊放大)

3、這是Net2FTP的Web文件在線管理界面,界面簡潔,有簡體中文等多種語言,Net2FTP顯示的文件范圍取決於你的FTP賬戶的許可權,如果你的FTP賬戶只限於某一個Web目錄,則Net2FTP也只顯示該目錄下的文件。(點擊放大)

4、Net2FTP可以直接復制、刪除、編輯、移動和解壓縮文件。

5、Net2FTP提供了強大的在線文件編輯器,可以直接在線編輯和修改文件,保存後文件自動上傳到空間上。

6、現在Net2FTP已經提供了手機界面,直接在Net2FTP點擊切換。

7、Net2FTP手機版本界面非常適合手機上使用Net2FTP。

『肆』 000webhost採用國內ip使用net2ftp會被禁止ip嗎

000webhost是國外著名空間商Hosting24旗下的免費虛擬主機產品,號稱「比收費虛擬主機更好用」。而確實如其所說的,該空間非常優質和穩定。
而該空間提供商也見識到了中國人口之多,中國用戶申請到有一定難度。他的口碑也確實不錯。000webhost提供的免費服務:全能php空間1.5G ,支持PHP(不支持ASP),支持綁定頂級域名,無任何廣告,獨立控制面板,免費創建Mysql資料庫,FTP上傳下載,在線壓縮解壓,支持fopen()函數。

『伍』 為什麼我的網站不能安裝net2ftp

linux系統?
你怎麼能確定你上傳成功,你是怎麼上傳的?
網站還是ftp

『陸』 C# ASP.net FTP上傳功能本地編譯沒問題,網站發布後通過網址訪問再用此功能報404錯誤

404 錯誤意味著鏈接指向的網頁不存在,即原始網頁的URL失效,這種情況經常會發生,很難避免,比如說:網頁URL生成規則改變、網頁文件更名或移動位置、導入鏈接拼寫錯誤等,導致原來的URL地址無法訪問;當Web 伺服器接到類似請求時,會返回一個404 狀態碼,告訴瀏覽器要請求的資源並不存在。
導致這個錯誤的原因一般來說,有三種:

1、無法在所請求的埠上訪問Web站點。

2、Web服務擴展鎖定策略阻止本請求。

3、MIME映射策略阻止本請求。
解決辦法:
1. 對於存在的網頁內容由於路徑改變而導致訪問不了時,可在IIS 中定義404錯誤指向一個動態頁面,在頁面裡面使用301永久重定向跳轉到新的地址,此時伺服器返回301狀態碼。

2、設置404指向一個設計好的html文件,
此時頁面返回的404狀態碼。
idc提供商基本都提供404設置的功能,直接上傳文件設置即可。在IIs中設置方法:打開IIS管理器-->點擊要設置自定義404的網站的屬性
-->點擊自定義錯誤選項-->選中404頁-->選中並打開編輯屬性-->設置成 URL --> URL
里填寫「/err404.html」-->按確定退出再把做好的err404.html
頁面上傳到網站根目錄下。此處在「消息類型」中一定要選擇「文件」或「默認值」,而不要選擇「URL」,不然,將導致返回「200」狀態碼。

3、404指向一個動態頁面,
比如error.asp,如果不在頁面裡面進行設置,僅僅是返回提示的HTML 代碼,將導致頁面返回200
狀態碼,這是不正確的,我們可以在顯示完提示內容後,增加語句: Response.Status="404 Not Found"
,這樣就保證頁面返回404狀態碼。

4、Apache下設置404錯誤頁面。為Apache Server設置404錯誤頁面的方法很簡單,只需在.htaccess 文件中加入如下內容即可,ErrorDocument 404 /notfound.php

『柒』 請問asp.net mvc 2.0用ftp上傳到網上去的問題

那不是域名映射不到,是ASP.NET路由沒有啟用的緣故..............
去找System.Web.Routing.dll扔到Bin裡面去吧

『捌』 如何漢化net2ftp

在\files_to_upload裡面找到settings.inc.php,這個是配置文件,用記事本打開它,我們來進行簡單的設置。找到
$net2ftp_settings["default_language"] = "en";(默認的語言英語,漢語版本有問題,不建議使用)
$net2ftp_settings["default_skin"] ; ; ; ;= "india";(皮膚,建議改成blue,因為這個皮膚做的很完美)
$net2ftp_settings["admin_username"] = "admin";(默認的管理員名稱,可以修改)
$net2ftp_settings["admin_password"] = "";(默認為空,如果你要記錄程序使用日誌,添加密碼即可)
$net2ftp_settings["max_upload_filesize"] ; ;= "2000000"; ; ;(文件最大上傳大小,默認2M,根據需要修改)
$net2ftp_settings["use_database"] = "no"; (是否記錄登陸日誌,默認NO,可修改為YES,別忘了把create_tables.sql導入到你的MySQL裡面)
// Enter your MySQL settings(這里的幾個要在上面那個選項為YES時填寫)
$net2ftp_settings["dbusername"] = "";用戶名
$net2ftp_settings["dbpassword"] = "";密碼
$net2ftp_settings["dbname"] ; ; ; ;= "";資料庫名
$net2ftp_settings["dbserver"] ; ;= "localhost"; 地址
$net2ftp_settings["max_consumption_ipaddress_dataTransfer"] = 20000000; // 每個IP每天最多傳輸文件位元組$net2ftp_settings["max_consumption_ftpserver_dataTransfer"] =50000000; // 每個FTP伺服器最多接受位元組

『玖』 可以在線解壓的ftp工具

建議你使用8uftp支持在線解壓縮,支持多線程上傳。 功能也非常強大,涵蓋其它FTP工具功能獨家支持多線程上傳,使上傳速度更快更穩定。 同時支持直接上傳壓縮包,可在空間上直接解壓。也可以在空間上壓縮後直接下載壓縮包使用8uftp在線解壓必須 客戶端和服務端 一起配合使用才行!

『拾』 有沒有網路版的FTP上傳工具

搜「網頁版的ftp客戶端」,網路不讓貼網址:
擁有這款在線網頁FTP客戶端 ,我就可以不用再在本地安裝安裝諸如FlashFXP或CuteFTP一類的客戶端軟體,而直接在線管理Liondrive的FTP帳戶了。

Net2FTP是一個完全基於網路的網頁版FTP客戶端,雖然是基於網路,但FTP客戶端該有的功能,net2ftp可一樣也不少。上傳文件、下載文件、一鍵安裝常用軟體、壓縮/解壓縮、代碼高亮、文本編輯器、HTML 編輯器、etc. 但這些也要受到ftp帳戶本身許可權的限制。

熱點內容
騰訊雲盤上傳限制 發布:2024-09-29 12:12:15 瀏覽:270
新款一汽大眾嘉旅配置怎麼寫 發布:2024-09-29 12:12:09 瀏覽:949
捷在線壓縮 發布:2024-09-29 12:11:27 瀏覽:849
gzip解壓軟體 發布:2024-09-29 12:11:20 瀏覽:503
asp網站源碼修改 發布:2024-09-29 12:06:51 瀏覽:82
如何查看linux的內核 發布:2024-09-29 12:02:04 瀏覽:5
存儲管理制度 發布:2024-09-29 12:00:36 瀏覽:414
小學生學編程培訓機構 發布:2024-09-29 11:33:53 瀏覽:63
gcc怎麼編譯c文件在網頁上顯示 發布:2024-09-29 11:33:50 瀏覽:917
伺服器反查ip 發布:2024-09-29 11:18:18 瀏覽:18