programmatic IISconfiguration via ASP.NET application

  • Thread starter Thread starter Michael Porcelli
  • Start date Start date
M

Michael Porcelli

Hello,

I am using ASP.NET to create a web-based application that allows users
to create their own web-site on our server. A requirement is that the
users have their own domain and particular IP address. A key to
getting this to work is to allow the web application to create a new
web root on the web server.

1. Is there some API provided to configure IIS in the required fashion?
2. Is this API available in .NET?
3. If not, is there a readily availably .NET wrapper for it?

For maximum generality, the web application should be able to create a
new web root on some web server other than the one the application
resides on. However, at the moment solving this problem for the
single server is more urgent.

Thanks,
-Michael.
 
In VS.NET, you can maintenan your web site with classes in
System.DirectoryServices, for example, to add a web site (Be careful that
your ASPNET account has enough permission to do this):

DirectoryEntry oWebService = new DirectoryEntry("IIS://LocalHost/W3SVC");
DirectoryEntry oWebServer = oWebService.Children.Add("Test
Site","IISWebServer");

For more information about System.DirectoryServices, you can refer to MSDN
or this article:

HOW TO: Use the System.DirectoryServices Namespace in ASP.NET
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q329986

Luke

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Back
Top