In my web.config file, I have the standard impersonate line:

<identity impersonate="true" userName="domain\username" password="password"/>

Which works great and after I publish the site, I run an encryption on this section so security is not really an issue. However, I am trying to update my sites so that the password is read from a table (which is stored in an encrypted format) via a function that also runs a decryption. I'm not sure if I can do this in a web.config or not, but barring that, are there any other suggestions for how to accomplish this? The end result is that I would like to be able to change the password in my table and have that change automatically go down to all my sites that use this account.

Ideally, I would like the impersonate line to read:

<identity impersonate="true" userName="domain\username" password="myDecryptFunction.Decrypt(username)"/>