How to restart the IIS Site when re-compiling an asp.net website

Posted by Glennular on Stack Overflow See other posts from Stack Overflow or by Glennular
Published on 2010-05-21T16:19:42Z Indexed on 2010/05/21 16:40 UTC
Read the original article Hit count: 214

What is the best way to add into the build/compile script of an Asp.net project to initiate a IIS to restart the website on DLL rebuild instead of the first request to the site.

Current Process

  1. Compile Project
  2. Wait
  3. Hit APSX Page
  4. IIS starts reload
  5. Wait
  6. Page loads

Ideal process:

  1. Compile Project & Reload IIS
  2. Wait
  3. Hit APSX Page
  4. Page loads

The first way I though of was add a request to just hit one of the pages in the "Post-Build events". Just wondering best practices. This would be similar to "Start" which opens a page immediately on build.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about visual-studio