tags:

views:

21

answers:

1

Does anyone know how to control IIS (7.0+) from C#.NET?

I want to create and FTP site and then create an FTP users which has read and write access on different folders?

Is there some sort of library I can user for this?

Thank you

A: 

You should be able to use the IIS ADSI Provider Interfaces to do this.

Here's a blog post with a sample for reading configuration: HOWTO: Enumerate IIS website and ftpsite configuration (VBScript using ADSI)
You should be able to adjust this sample to instead write the information you need and then just convert the script to C#.

This KB article should show you how to use ADSI from C#: How to access ADSI objects in Visual C#

ho1