in

Agramont.net

VP of Mural Consulting...SaaS Strategy & Execution. Accelerated.

Provware

How To: View Application Pool Identity for an IIS Website

This example will show you how to create a new website using the Provware Framework (Build 001).

  1. Create a reference pointing to the Provware.Framework.dll assembly.
  2. Add a directive to use the "Provware.Framework.Web" namespace

    using Provware.Framework.Web;

  3. Add the following code to your C# application


            WebManager wm = new WebManager();
            // Connect to Server
            WebServer ws = wm.Connect("localhost");
           
            // Bind to site by SiteName (Provwware Terminology)/ServerComment
            Site defaultWeb = ws.Sites["Default Website"];

            // Get the Application Pool ID
            string defaultWebPool = defaultWeb.IIsWebServer.AppPoolId;

            // Bind to the Application Pool Object.
            ApplicationPool pool = ws.ApplicationPools[defaultWebPool];

            Console.WriteLine(pool.IIsApplicationPool.WAMUserName);

Published Jul 31 2006, 01:59 PM by agramont
Filed under: , ,

Comments

 

Conrad Agramont's Blog said:

Last night, I posted the first build of the Provware Framework on my site (http://agramont.net/files/14/default.aspx).

July 31, 2006 7:26 PM
 

Conrad Agramont's WebLog said:

Last night, I posted the first build of the Provware Framework on my site (http://agramont.net/files/14/default.aspx).

July 31, 2006 7:26 PM
 

mmiika said:

Have you stopped development of this unique framework? Could be great to get it "finished" as there are not too many ways to control IIS.... how about open sourcing it somewhere?

The appPools are not initialized properly for each site. Every single site seems to think it's appPoolId is "DefaultAppPool". Also saw a bug in Provware.Framework.Web.ApplicationPools, the Add method is now _apps.Add(ApplicationPool, ApplicationPool) though it should say _apps.Add(ApplicationPool.Name, ApplicationPool)

April 25, 2007 11:30 PM

Leave a Comment

(required)  
(optional)
(required)  
Add

About agramont

Conrad Agramont is a Partner Technology Specialist (PTS) focused on the Microsoft Server product lines in the Small and Mid-Market Solutions and Partners (SMSP) area for the Mid-Atlantic district. Conrad was previously the Senior Architect for a Microsoft Gold Partner where he was responsible for product planning, software architecture, and technical evangelism focusing on Service Providers around the world. Agramont was previously a Program Manager at Microsoft driving hosting scenarios and architecting components for the Microsoft Provisioning System, Service Provisioning component in Microsoft Solutions for Hosted Messaging & Collaboration, Hosted Exchange 2003, and Windows based Hosting 3.0. Conrad has over 8 years of experience in the Microsoft automation and hosting space, speaking at public events, and publishing articles in magazines. Conrad Agramont is also an active blogger focusing on many Microsoft Hosting related topics. His blog can be found at http://agramont.net/
Copyright Agramont.net, 2006. all rights reserved