Solved

(ASP) Creating Web and FTP sites

Posted on 2001-06-19
8
414 Views
Last Modified: 2008-02-01
I am programatically(through asp) creating web sites, and ftp sites. I can get the web site side of it right... but can't get the ftp side to work properly. When I create the ftp site, and go to browse it, it says I don't have access, and shows nothing in the Internet Services Manager. Here's some sample code: (that doesn't work although the principal is there)

iParentID = 0

sKeyType="IIsFtpServer"
sRootKeyType = "IIsFtpVirtualDir"
sNodeID = cInt(sGetNextInstanceName("IIS://localhost/MSFTPSVC"))
Set oParentNode = GetObject("IIS://localhost/MSFTPSVC")
if (Err <>0) then
     Response.Write "GetObject (""" & servpath & """) Failed! <br>"
     Response.Write "Error! " & Err.Number & "(" & Hex(Err.Number) & "): " & Err.Description & "<br>"
     Response.End
end if
sNodeName= "ftp.boo.com"

sPhysPath = "d:\test"

Set oNewNode=oParentNode.Create("IIsFtpServer", sNodeID)
oNewNode.SetInfo

Set oRootNode=oNewNode.Create(sRootKeyType, "ROOT")
oRootNode.SetInfo
with oRootNode
    .Path = cstr(Path & "\HTML\DATA\Transfer")
    .AccessRead = True
    .AccessWrite = True
end with
oRootNode.SetInfo
     
with oNewNode
     .ServerComment = sNodeName
     .ServerBindings= ":21:" & sNodeName
     .ExitMessage = "GoodBye. Remember to visit www.response-software.com for all you software needs!"
     .GreetingMessage = "Hello. Remember to visit www.response-software.com for all you software needs!"
     .MaxClientsMessage = "Sorry, the maximum number of users are already connected to this ftp site. Please try again in a few minutes. Remember to visit www.response-software.com for all you software needs!"
     .AccessRead = True
     .AccessWrite = True          
     '.AllowAnonymous=true
end with
oNewNode.SetInfo
oNewNode.Start
0
Comment
Question by:mucosis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 18

Expert Comment

by:mgfranz
ID: 6206647
I don't see where you are setting permissions on the new dir., which means it will inherit the parent permissions.

Intresting concept though...
0
 
LVL 1

Author Comment

by:mucosis
ID: 6206666
I set AccessRead, and AccessWrite both at the server level, and at the "ROOT" level...(In desparation). Should I create a directory below the root and set permissions on that?
0
 
LVL 1

Author Comment

by:mucosis
ID: 6207199
So I've found something out. I am trying to set up multiple FTP sites on the same IP address, using Host Header Names. So I set up the FTP site, and point it at an existing directory, and it still points to my default FTP location(that comes with a standard install of IIS...I went and created directories there, and it showed them in my site.)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 18

Expert Comment

by:mgfranz
ID: 6207230
You can't set multiple FTP sites on the same IP address.  This is standard IIS functions.
0
 
LVL 7

Expert Comment

by:John844
ID: 6207332
the only way to create multiple ftp sites on the same ip address is to use a different port number for each.  There is no way to associate the host header names for ftp sites.
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6207353
?  How would you do that John?  As far as I know, FTP traffic has to travel on port 20/21, it's not like setting a port for a new Application...

Can you elaborate?
0
 
LVL 7

Accepted Solution

by:
John844 earned 50 total points
ID: 6208021
when you are configuring the ftp site, one of the options is what port to use, the default is 21.  Microsoft recommends if you are going to use different ports than the default, that you use ports above 1024.  When you connect to the ftp site you just specify what port to connect on(either a setting or ftp://ftp.mysite.com:1024).
0
 
LVL 1

Author Comment

by:mucosis
ID: 6210957
do you have any Idea how ISP's set up their ftp sites? Our ISP lets you ftp in on your own domain name i.e. ftp.response-software.com, but you can also use a range of about 5 IP addresses(and they have roughly 250 000 domains registered). So I presume they have 5 ftp servers, but everyone still gets to their own space.... HOW??? I'm tearing my hair out trying to find out!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question