build-automationnantnantcontrib

IIS site and nant/nantcontrib?


is it possible to manage IIS web applications with NAnt? For example stop or start it?


Solution

  • Maybe you can use exec task to execute

    iisreset -stop
    iisreset -start
    

    EDIT : And this VBS might help for stopping/starting WebApplications under IIS

    Here is the accespted solution to stop a website with nant task on IIS :

    <target name="stopSite"> 
      <exec program="cscript.exe"> 
        <arg value="C:\windows\system32\iisweb.vbs" /> 
        <arg value="/stop" /> 
        <arg value="test" /> 
      </exec> 
    </target>