A recent requirement in the project made us to write this article.The requirement was to Start And Stop Application Pool From C#. We have create a batch program to do the operation and invoke the same from C#

Introduction

A recent requirement in the project made us to write this article.The requirement was to Start And Stop Application Pool From C#. We have create a batch program to do the operation and invoke the same from C#. We are not claiming that this is the only way to do it, but however, it is a way to do so. So let's start.

Let's start the experiment

Let's first create a website in IIS say ExampleSiteForTest

Next create an Aplication Pool say ExampleApplicationPool

Now we need to add the ExampleSiteForTest to the ExampleApplicationPool. Choose the ExampleSiteForTest first. In the Actions pane, click Basic Settings to open the Edit Site dialog box.