Main Topics
Browse All TopicsI am able to get a list of my application pools using DirectoryServices, however I want to find the Identity that the application pool is running under, so if the Identity is "DEVELOPMENT\MyIISAcct" as shown in IIS 6 Identity tab for the application pool I want to be able to retrieve that string using VB.NET and DirectoryServices.
Many thanks,
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hey :)
The Identity is stored across a couple of properties
First you have:
AppPoolIdentityType
0 - Local System
1 - Local Service
2 - Network Service
3 - Configurable
If the AppPoolIdentityType is set to 3 you can read the user name from the WAMUserName property. WAMUserPass is there too, but the string is encrypted.
Back to VB that should be something like the snippet below. Obviously you'll want to do more with "Identity" than I have here.
HTH
Chris
Business Accounts
Answer for Membership
by: servoadminPosted on 2009-09-09 at 19:39:21ID: 25297061
Step 5. Configure Your Application to Run in the New Application Pool
In this step, you configure your test ASP.NET application to run in the new application pool. This ensures that it runs using the custom service account identity.
1.Return to the Internet Information Services (IIS) Manager.
2.Locate your test application, TestCustomPool, in the left pane of the IIS Manager console.
3.Right-click TestCustomPool and click Properties.
4.On the Directory tab in the Properties dialog box, in the Application Settings section, select TestPool from the Application pool list, and then click OK.
Step 6. Test the Custom Service Account
Browse to the Default.aspx page of your test application. It should display the name of your custom service account, confirming that your application is running using this identity. The browser should display the following:
Copy Code Windows Identity Check
Name: <ServerName>\CustomASP
Where <ServerName> is the name of your server.