Advertisement
Guest User

Untitled

a guest
Jul 12th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. using (var serverManager = new ServerManager())
  2. {
  3. ApplicationPool applicationPool = serverManager.ApplicationPools.Add(name);
  4. applicationPool.AutoStart = true;
  5. applicationPool.ManagedPipelineMode = ManagedPipelineMode.Integrated;
  6. applicationPool.ManagedRuntimeVersion = "v4.0";
  7.  
  8. // START ISSUE:
  9. applicationPool.ProcessModel.IdentityType = ProcessModelIdentityType.SpecificUser;
  10. applicationPool.ProcessModel.UserName = username;
  11. applicationPool.ProcessModel.Password = userPassword;
  12. applicationPool.ProcessModel["idleTimeoutAction"] = 1;
  13. // END ISSUE
  14.  
  15. serverManager.CommitChanges();
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement