Solved

(ASP) Creating Web and FTP sites

Posted on 2001-06-19
8
401 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
  • 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

919 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now