Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Developer tool for configuring IIS6

Tags:

asp.net

iis

edit: IIS6; I'm not sure IIS7 is an option in the immediate future...

From a developer angle, I am constantly changing my IIS settings, or need to merge settings from other teams into different VMs. The "Save Configuration to Disk" has never really worked well for me.

Because we are making lots of small changes, web installation projects have never really worked either... Tools aimed for the web-admin aren't necessarily a good fit for the developer - we have different aims and needs.

Does anyone have a script / tool / utility that would allow us to quickly configure IIS? In particular:

  • remove everything (start clean)
  • add a load of virtual directories, each mapped to application base paths
  • set as an application
  • set the app-pool (we'll assume the app pool already exists)
  • set the ASP.NET version to 2.x if needed

from some find of flat input list (any format would do).

like image 319
Marc Gravell Avatar asked Jun 08 '09 15:06

Marc Gravell


2 Answers

I can think of three options off the top of my head...

  1. Powershell snap-in.
  2. the AdsUtil.vbs (located in C:\Inetpub\AdminScripts by default) will enable you to script those tasks into a batch file, or you could even call it from powershell if you don't have the time to invest learning the WMI interface for IIS.
  3. MSBuild script. Probably harder to configure but the MSBuild Extension Pack provides some tasks for managing both IIS6 and IIS7 from a MSBuild script.

I think if it was me needing to do this, I would use Powershell, or remove the need all together and create a base VM install that had all the basics already configured in. When I'm done with teasting I'd just rollback the harddrive and be free to go again.

like image 150
David McEwing Avatar answered Sep 21 '22 04:09

David McEwing


PowerShell with the IIS administration snapin?

like image 36
Richard Avatar answered Sep 23 '22 04:09

Richard