Automate the creation of Users and a FTP Site

  • Thread starter Thread starter Jon Gross
  • Start date Start date
J

Jon Gross

We have a project that will require the almost realtime (every 5
minutes) creation of user accounts and a FTP site for each of them. I
would like to write a VB.Net application to do this. This can be a
standard desktop application.

What is the best way to accomplish this?
- Create a user by inserting a "NewUser" into active directory?
- How do I identify a folder as the FTP folder for that new user?

Any ideas or reference material would be appreciated.

We plan to use W2k Server and IIS5 but that can change if needed.

Thanks in advance
Jon
 
Hello Jon,

Thanks for your post. As I understand, you want to programmatically create
a user and a FTP site. Please correct me if there is any misunderstanding.
I now share the following information with you:

1. >> - Create a user by inserting a "NewUser" into active directory?

The Microsoft .NET Framework includes a System.DirectoryServices namespace
which contains classes to interact with and manipulate the directory from
within managed code and allow you to access any ADSI provider, including
Active Directory. The following article in codeguru contains sample code to
add a user into AD:

Accessing Directory Services
http://www.codeguru.com/cs_network/AccessDirServ.html

2. >> - How do I identify a folder as the FTP folder for that new user?

IIS provides scripts to create FTP Virtual Server and Directories. For
Windows 2000, you can execute MKFTPSITE.VBS
(%SystemDrive%\InetPub\AdminScripts\MKFTPSITE.VBS) from within your .NET
application, while it is IIsFtp.vbs
(%SystemDrive%\Windows\System32\IIsFtp.vbs) for Windows Server 2003.

IIS Sample ADSI Script to Create FTP Virtual Servers
http://support.microsoft.com/?id=247364

IIS Sample ADSI Script to Create FTP Virtual Directories
http://support.microsoft.com/?id=254808

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Thanks for your reply.

I have read thru those scripts and understand what they are doing. Is
there any reason that I can not translate that code into VB.Net and
add it to our WinForm application?

If you would know of any examples that are already in vb.net that
would be great.
 
Hi Jon,

Thanks for your response. We are able to translate VB script code to VB
.NET and add it to .NET application. It needs some work for the
translation, so I suggested to execute .VBS directly.

If you have any problems regarding VB code translation, I recommend you the
following newsgroup:
microsoft.public.dotnet.languages.vb

Please feel free to let me know if any futher is needed.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top