Solved

(ASP) Creating Web and FTP sites

Posted on 2001-06-19
8
398 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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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 …
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

12 Experts available now in Live!

Get 1:1 Help Now