Yes, through a custom installer. Unfortunately, I do not know of any great
source for the information on building a custom installer component. You
basically grab the file, as XML, prior to deploying. If you run this after
the install, the file gets locked.
Another option is to incorporate the Configuration Management Application
Block (free download, full source) from MSDN:
download =
http://www.microsoft.com/downloads/...53-8CA7-4A92-85E3-E4795BD27FEB&displaylang=en
info =
http://msdn.microsoft.com/library/en-us/dnbda/html/cmab.asp?_r=1
With custom configuration, you create additional config files that can be
set at any time (a way around the web.config lock from application code). In
addition, you can add the DPAPI (data protection API) to encrypt the
information; the DPAPI is already coded into the Block, so you basically
tell it to encrypt and it encrypts. Very easy to use once you get used to
it.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
************************************************
Think Outside the Box!
************************************************