🇵🇸 Call for a #CeasefireNOW 🇵🇸

Act Now

Microsoft.Web.Administration for IIS

Update: In addition to this post, you can check as well the valuable post of Stuart Cullinans’s. One of the recent projects I worked on involved managing IIS programmatically, and I found the proper tool for it, meet “Microsoft.Web.Administration”. You can read about this library’s purpose in its own page above; what I will list here are three points I noticed while dealing with the library: I couldn’t find where to download, or install the library from, it appeared to be residing in “C:\Windows\SysWOW64\inetsrv\Microsoft.Web.Administration.dll” and yes my OS is 64-bit I am not sure where you can find that on a 32-bit machine The main class ServerManager reads data the moment it’s created only, it will NOT maintain a valid state after the initial read; for example, consider the following snippet: static WorkerProcess currentWP; static void Main(string[] args) { currentWP = new ServerManager().ApplicationPools[0].WorkerProcesses[0]; while (!Console.ReadLine().Equals("quit")) { Console.WriteLine(currentWP.ProcessId.ToString()); } } This code snippet will get the first WorkerProcess of the first Application Pool in the local IIS. Run the code, enter bogus input just to make sure the loop works, and you will find on the Console the W3WP Process Id displayed (e.g. 4295). ...

September 11, 2012 Â· Emad Alashi