IIS Automation

M

Mick Walker

Hi All,

We are trying to automate the deployment of clients websites using IIS.
At the moment we can create a new virtual directory on the server using:

//Create a virtual directory

System.EnterpriseServices.Internal.IISVirtualRoot vr = new
System.EnterpriseServices.Internal.IISVirtualRoot();

string sError;
vr.Create("IIS://localhost/W3SVC/1/Root",@"C:\Demos\WebServices\","WebServices",out
sError);

Does anyone know how we can actually create a new website, binding it to
the default port?

Regards
Mick Walker
 
C

Chris Fulstow

Hi All,

We are trying to automate the deployment of clients websites using IIS.
At the moment we can create a new virtual directory on the server using:

//Create a virtual directory

System.EnterpriseServices.Internal.IISVirtualRoot vr = new
System.EnterpriseServices.Internal.IISVirtualRoot();

string sError;
vr.Create("IIS://localhost/W3SVC/1/Root",@"C:\Demos\WebServices\","WebServices",out
sError);

Does anyone know how we can actually create a new website, binding it to
the default port?

Regards
Mick Walker

Hi Mick

You might be able to this using a Web Setup Project.
Otherwise, if you need to do it through code then check out
System.DirectoryServices

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top