My company has an e-commerce website which I constantly keep updating the website for.

The problem is whenever I push out some stuff to the live site, like user controls page, the Application Pool gets recycled and website gets recompiled, and the customers who were already on the site experienced delays and/or see errors on the site.

How do I prevent such bad user experiences and/or possibly losing customers? I am using C# and IIS 7.

  • This won't work for page layout changes, but if you're just changing/adding product names, descriptions, prices, etc, move that info to a database if isn't already so you can update the DB without deploying code updates. Jul 31, 2013 at 20:50

3 Answers 3


I use load balancing to prevent errors and keep the site up during updates. For this to work you need at least two servers behind a load balancer that sends traffic to whichever server is up. My procedure for updating my sites is:

  1. Tell "Server A" to start serving an error page at the URL that the load balancer pings. This tells the load balancer to stop sending traffic to this server.
  2. Wait 30 seconds or so until traffic stops hitting the server.
  3. Update the code on this server.
  4. Tell the server to stop serving an error page at the ping URL.
  5. Wait until that server is getting traffic again.
  6. Repeat steps 1-5 with "Server B".
  • Unfortunately we can't afford to buy another server at the moment, but this is the answer I was looking for! Aug 1, 2013 at 21:47
  1. Don't deploy when the site is live. You should take down the site so no users are active at the time of deployment. If your site is very active advanced notice of downtime is usually encouraged. Also, when the site is down, be sure to have a notice up stating why the site is down and when it is expected to be back up.

  2. Don't deploy during active periods of site usage. Deployments should occur late at night when site usage is at a minimum. No one likes to work after hours but this is part of how code rollouts work.


Specific to your IIS environment:

You could consider creating a new application pool for your changes, as covered here:

The element contains configuration settings for all application pools running on your Internet Information Services (IIS) 7 server. An application pool defines a group of one or more worker processes, configured with common settings that serve requests to one or more applications that are assigned to that application pool. Because application pools allow a set of Web applications to share one or more similarly configured worker processes, they provide a convenient way to isolate a set of Web applications from other Web applications on the server computer. Process boundaries separate each worker process; therefore, application problems in one application pool do not affect Web sites or applications in other application pools. Application pools significantly increase both the reliability and manageability of your Web infrastructure.

And then remove the older application pool at a later time to increase server performance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.