|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Configuring App Pools using Code (or scripts)
I am trying to create a script to go through all of the creation of App Pools, Virtual Dirs, and everything else in IIS that we are using in our project. I have one problem and that is configuring the App Pools to run as a configurable user.
I have this code from the MSDN site: static void CreateAppPool(string AppPoolName) { DirectoryEntry newpool; DirectoryEntry apppools=new DirectoryEntry("IIS://localhost/W3SVC/AppPools"); newpool=apppools.Children.Add(AppPoolName, "IIsApplicationPool"); newpool.CommitChanges(); } and it creates the App Pool but the identity is a "Predefined" and "Network Service", but I need the Identity tab to read "Configurable" with our custom user and password. Does anyone know (code, utils, anything else I can put in a batch file) that would allow me to change the identity of the App Pools? |
|
#2
|
|||
|
|||
|
I don't know, but I recall an article in windows & net magazine about scripting IIS administration not too many issues back, maybe you can find the article on their website.
__________________
====== Doug G ====== "Hide, hide witch! The good folk come to burn thee. Their keen enjoyment hid behind their gothic mask of duty." -Mark Clifton |
|
#3
|
|||
|
|||
|
hope this helps:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/iis/changing_the_identity_of_a_worker_process.asp |
![]() |
| Viewing: Dev Shed Forums > System Administration > IIS > Configuring App Pools using Code (or scripts) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|