473,396 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Create IIS FTP directories and Accounts

Hello,

I have been trying for some time to create an FTP folder on my IIS Ftp
server and an user account to log into this folder and have "write" access.
Please help me, because I am almost desperate now. The problem is that I
can't figure out how to give the user rights to "write" into the ftp folder.
This is my code:

DirectoryEntry deRoot= new DirectoryEntry("IIS://" + txtServer.Text +
"/MSFTPSVC/1/Root");

try

{

deRoot.Username = txtUser.Text;

deRoot.Password = txtPass.Text;

deRoot.RefreshCache();

DirectoryEntry deNewVDir =
deRoot.Children.Add(txtDir.Text,"IIsFtpVirtualDir" );

if(!Directory.Exists(txtDir.Text))

{

DirectoryInfo di = Directory.CreateDirectory(txtPath.Text);

}

deNewVDir.Properties["Path"].Insert(0,txtPath.Text);

deNewVDir.CommitChanges();

deRoot.CommitChanges();

// Save Changes

deNewVDir.CommitChanges();

deRoot.CommitChanges();

deNewVDir.Close();

deRoot.Close();

}

catch (Exception ex)

{}

Thanks in advance!
Nov 17 '05 #1
0 1101

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: jiing | last post by:
I want to use web interface to do : 1. user accounts management (adminstration side) 2. personal password management (user side) 3. create actual accounts under windows 2003 server( for handling...
3
by: eastcoastguyz | last post by:
On an Apache server, I want to be able to have a user name/password directory. I know this can be done with .htaccess, but I want to be able to do this for multiple users. The purpose of this, is...
3
by: MLH | last post by:
I was running the following code while logged in as a user belonging only to the Users group. Set usrNew = .CreateUser(Me!UserID) 'The user ID is in a control on the form usrNew.PID =...
1
by: David Meier | last post by:
Hi, how can I (easily) list all local user accounts as user name/home directory? Thanks.
11
by: Andre | last post by:
Hi, I have ASP.NET application running on standalone (not part of the domain) Windows 2003. I use forms authentication for my application. The problem I have is that I need to create and read...
4
by: anders | last post by:
Hi! To create a new Windows account I use this code: const int UF_PASSWD_CANT_CHANGE = 0x0040; const int UF_DONT_EXPIRE_PASSWD = 0x10000; DirectoryEntry obDirEntry = new...
5
by: Michael Sperlle | last post by:
Is it possible? Bestcrypt can supposedly be set up on linux, but it seems to need changes to the kernel before it can be installed, and I have no intention of going through whatever hell that would...
23
by: sandy | last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory', within my class Directory (Can you already smell disaster?) Each Directory can have subdirectories so I thought to put these...
2
by: nja2222 | last post by:
I would like to create a page for my clients to login and check for updates on their accounts. Then I would like to create a page where my employees can login and make updates, specifically new file...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.