Have you ever wanted to change the username and password for an Application Pool using C#?
using(ServerManager serverManager = new ServerManager())
ApplicationPool pool = serverManager.ApplicationPools["AppPoolName"];
pool.ProcessModel.IdentityType = ProcessModelIdentityType.SpecificUser;
pool.ProcessModel.UserName = @"username";
pool.ProcessModel.Password = @"password";
You need to add a reference to Microsoft.Web.Administration dll, located in Windows\System32\inetsrv directory
Have you ever wanted to change the password associated with your Database Master Key?
use my database
--step 1, open the key
OPEN MASTER KEY DECRYPTION BY PASSWORD = 'my password'
--step 2, regenerate it with new password
ALTER MASTER KEY REGENERATE WITH ENCRYPTION BY PASSWORD 'new password'
There are no notes on this topic.