• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 437
  • Last Modified:

(ASP) Creating Web and FTP sites

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
mucosis
Asked:
mucosis
  • 3
  • 3
  • 2
1 Solution
 
mgfranzCommented:
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
 
mucosisAuthor Commented:
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
 
mucosisAuthor Commented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
mgfranzCommented:
You can't set multiple FTP sites on the same IP address.  This is standard IIS functions.
0
 
John844Commented:
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
 
mgfranzCommented:
?  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
 
John844Commented:
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
 
mucosisAuthor Commented:
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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now