Solved

(ASP) Creating Web and FTP sites

Posted on 2001-06-19
8
405 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
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

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 …
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 Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

809 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