views:

1297

answers:

2

Hi,

I'm relatively new to Nant, what i'd like to do is have a task that creates a new Website and AppPool in IIS6

is there a way to do this in Nant?

Essentially the task would need to set all the appropriate properties including the correct version of the .net Framework

Ideally i'd also like to check if the site is already present in IIS.

+1  A: 

You can do this from the command line using ADSUTIL, you can find more information here:

http://blogs.msdn.com/david.wang/archive/2007/12/12/howto-create-custom-application-pool-by-commandline.aspx

To do this in Nant you can use the exec task.

How are you planning on deploying your application? Do you need this just for local installation? There may be a better solution if you can give us some more details.

jonnii
Thanks for your help,Yes this will be for a local installation.I'd like to get the project from Source ControlRun the nant script that will do an initial build of the site and configure it as a site in IIS6 Windows Server 2003Thanks
danswain
+2  A: 

Have you looked at NantContrib? It might provide some better IIS support without having to write your own task (or shelling out).

It has some IIS specific tasks like iisapppool and mkiisdir.

David Mohundro
Thanks unfortunately I think this are geared at creating virtual directories on a given site. the Visual Studio deployment project also has this similar assumption that you only have 1 Website running on your box.I have a few and use host headers and my hosts file to distinguish between themcheers
danswain