Last post Mar 30, 2007 04:15 AM by Benson Yu - MSFT
Mar 16, 2007 03:17 PM|aivanoff|LINK
What is the proper place for web.config file replacements?
Mar 23, 2007 01:57 AM|Benson Yu - MSFT|LINK
I cannot understand your request clearly from this post, could you please describe more detailed? A demo is prefered. Thanks.
Mar 23, 2007 10:51 AM|aivanoff|LINK
Lets say here is directory structure of your web project:
And say you have a replacement file connectionstrings.config. Where would you keep it? At the same level as your web.config? Create directory? Something else?
Mar 27, 2007 05:15 AM|Benson Yu - MSFT|LINK
From the file name I understand it is a configure file to store connection string information.
So you can keep it at the same level as your web.config or in sub directory or anywhere under the root of you web site. Because you can use ConfigurationManager
class to read sections in your configure file.
By the way, if your purpose of using connectionstrings.config is hide connection string information. My suggestion is remain connectionStrings in web.config and use aspnet_regiis to encrypt the section. For example:
aspnet_regiis.exe –pe connectionStrings –app /virtual path
If I have misunderstood your concern, please feel free to let me know.
Mar 30, 2007 04:15 AM|Benson Yu - MSFT|LINK
Maybe I have misunderstood your concern in my previous post. About the replacement file's location, it can be placed in the same level of web.config or in sub-directory.
The difference is only change the configSource element:
Same level with web.config
In a folder (configFiles)
If you have any other concern about this post, please feel free to let me know. Thanks.