IIS - FTP using ASP
Asked By AP
03-Jan-10 09:07 AM

Is it possible to use ASP to "FtpPut" or "FtpDelete" a file in an FTP
server ?
For example, in VBA I can do the following to "put" a file to an FTP
server (can something similar be done in ASP - I am just doing a
feasibility study to see if ASP is the correct platform for me -
thanks):
Public hConnection As Long, hOpen As Long, sOrgPath As String
Public Const INTERNET_OPEN_TYPE_PRECONFIG = 0
Public Const INTERNET_DEFAULT_FTP_PORT = 21
Public Const INTERNET_SERVICE_FTP = 1
Public Const INTERNET_FLAG_PASSIVE = &H8000000
Public Const FTP_TRANSFER_TYPE_UNKNOWN = &H0
'Connect FTP server
strLogon = "xxxxxxx"
strPwd = "xxxxxxx"
hOpen = InternetOpen("Example", INTERNET_OPEN_TYPE_PRECONFIG,
vbNullString, vbNullString, 0)
hConnection = InternetConnect(hOpen, FtpServer,
INTERNET_DEFAULT_FTP_PORT, strLogon, strPwd, INTERNET_SERVICE_FTP, IIf
(PassiveConnection, INTERNET_FLAG_PASSIVE, 0), 0)
sOrgPath = String(MAX_PATH, 0)
FtpGetCurrentDirectory hConnection, sOrgPath, Len(sOrgPath)
'FTP
subfolder_name = "xxxxxxx"
FtpSetCurrentDirectory hConnection, subfolder_name
FtpPutFile hConnection, "C:\" & f & ".txt", f & ".txt",
FTP_TRANSFER_TYPE_UNKNOWN, 0
VBA
(1)
FtpGetCurrentDirectory
(1)
FtpSetCurrentDirectory
(1)
FtpPutFile
(1)
FTP
(1)
InternetConnect
(1)
InternetOpen
(1)
FtpDelete
(1)
Adrienne Boswell replied to AP
I have used the method mentioned here for quite a while and it works just
fine:
(watch wrapping)
--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
app which uses FtpWebRequest / Response. It used to work when it connected to an IIS FTP Server which I had running on a WinXP system which bit the dust a while I have on a Vista system. I am also unable to use a command line FTP client to see directory or files on the Vista system. Even when the client is as the server. Configuring IIS is probably way over my head, but I need an FTP server so that I can develop my .Net application and I am an experienced programmer none of those seem to have anything to do with which dirves and directories the FTP server can make available to clients. The second entry (i.e. "InternetInformationServices(IIS) 6.0 Manager") has a "FTP Sites" node which in turn has a "Default FTP Site" node. If I double click the FTP Sites" node I see the following information: Description: Default FTP Site Identifier: 1 State: Running IP Address: *All Unassigned* Port: 21 Error: The requested control
FTP IIS My ISP no longer supports FP extensions. I will have to publish using FTP. When I click on FTP to publish, the remote shows all my websites, instead of just the website I want do I publish to just one website? FrontPage Client Discussions Expression Web (1) Office (1) FTP (1) Symonds (1) AndUnix (1) Windows (1) Unix (1) Carr (1) Changing over from FP extensions to using FTP will disable many FP specific actions. Much is different. You can research the changes, but subweb in Remote Site Properties, Remote Web Site tab (FP2003), set the publishing location to ftp: / / www.example.com where example.com is your main website, and the FTP directory to the folder name for the subweb / site (leave blank for the root site domains and Webhost4life have DNS pointing to them, then on the Webhost4life control panel, create FTP accounts for each site using the domain name. - - Ron Symonds Microsoft MVP (Expression Web) http
Creating FTP account on Windows Server 2003 IIS Hi everyone, I have a Windows 2003 server that has IIS 6.0 installed on it. There is already a default FTP site configured and works fine. However, I need to create another FTP site on the server and give access to 4 users. There needs to be a minimum will do fine) and only the 4 users should have access to this new ftp site. I am not a network administrator but I have been given this duty. The problem huh? Thanks in advance IIS Discussions Windows Server 2003 (1) IIS 6.0 (1) FTP (1) Windows 2003 server (1) Figured it out for myself Cheers Be aware that if you are using IIS for FTP then the accounts you create are windows accounts, so do be sure that the users If you want a more secure approach then its better to use a third party FTP server - I'd recommend FTP Zilla Server, its free and it means your FTP accounts and Windows accounts can be
cute ftp IIS WOW, personally I use Expression Web, but my sister in law uses front page. She needed help with something, I downloaded her site via cute ftp, now when she opens it "live" in frontpage, the navigation from the theme disappears and in fp it does the same thing. NOW, when I upload the page via cute ftp the navigation is fine. What did cute ftp corrupt to make the navigation disappear in fp and when uploaded in fp? FrontPage Extensions WindowsNT Discussions Expression Web (1) Database (1) FTP (1) Symonds (1) Sister (1) Vti (1) Most likely, the navigation database. FrontPage navigation is stored in the _vti* folders created and maintained by FrontPage extensions. Using FTP on an extended site will, if you are lucky, not update, and usually will corrupt extensions on the server, and by FrontPage on the PC. Downloading a FrontPage site with FTP will definitely corrupt or even destroy the navigation database on the PC. Uploading with FTP will not affect the navigation in the page, provided the online site is _never_ downloaded
Tom [Pepper] Willett Microsoft MVP - FrontPage Since 1997 - -- -- -- -- -- -- -- -- -- -- -- -- -- NOT message and I and they Tried FTP transfer too, set up my FTP user account with the host on my Cpanel, got my username and password, etc. Went to file, publish site and chose FTP Entered ftp: / / www.saharaarabians.com / public_html / Then it prompted me for my username and password for the FTP user account? I think? So I entered my username and password. . . also tried my Cpanel that this is a different site. Could it be a problem on the hosting end? FTP accounts usually have different credentials, and the ones you have probably will not work. If you are going to try FTP, make sure you have a FTP account set up (which, when used, will corrupt the FP Server Extensions. Make sure you