Last post Sep 19, 2008 05:24 AM by Thomas Sun – MSFT
Sep 16, 2008 07:51 AM|LastHope|LINK
Hi to all,
as described byhe title, I've got some problem in understanding where I should put my config files (one for the connections when in debug, and the other when in release status).
In fact, I've tried to insert the files in the WebSite project or to specify where they are by editing the xml WD project file, but still, when I build the the WDP I get that it cannot find the file...
Sep 16, 2008 10:22 AM|ArminStockner|LINK
The config file has to be within your project and is called web.config. If you changes this name your website isn't working any longer. Maybe this is your problem.
Sep 17, 2008 06:48 AM|LastHope|LINK
Hmm...maybe I was misunderstood :)
Of course I'm not changing the web.config name of my project, but I have got two different config files (for debugging and release), and I wouldlike to sobstitute some parts of the web.config using these files, as described here:
Enable Web.config file section replacement Enables the replacement of any section in the root Web.config file with the content of a matching section in a separate (external) .config file. The external file can contain only the section being replaced.
This option enables you to define elements that are written to the root Web.config file at deployment time, which in turn provides a way to create deployment-specific configuration sections.
So...how should I define these separate (external) .config files , since it seems that my WDP isn't able to find them?
Sep 19, 2008 05:24 AM|Thomas Sun – MSFT|LINK
Please make sure we compile the Web Deployment project under corresponding build mode, for example, selecting Debug from Visual Studio configuration dropdownlist for Debug version of Web Deployment project.
Please also make sure that the .config files are side of web.config file.
We also can try to select "Use external configuration source file" to use configSource attribute to refer to external configuration source file.
For more information, see
http://msdn.microsoft.com/en-us/magazine/cc163448.aspx (Section: Pluggable Configuration Files).
I look forward to hearing from you.