Of course you can't put running code into the web.config. That wasn't what I
Point really was that you'd put machinenames into <appSettings> as keys (or
as part of keys say "connectionString_MACHINENAME") for connection strings
and then by using Environment.MachineName your code solves in which machine
it is running and picks the correct config setting ("connectionString_" &
Mansoft tietotekniikka Oy
AspInsiders Member, www.aspinsiders.com
ASP.NET Forums Moderator, www.asp.net
AspAlliance Columnist, www.aspalliance.com
"Kenneth" <se> kirjoitti viestissä
Kiitos paljon Teemu for a fast reply,
Environment.MachineName can't be used in web.config, only
in code in aspx doc.
If you have to test new things in web.config and test it
in dev machine then you'll end upp with a mess if you have
to rewrite it.
name of the machine.
respectively) based on
production machine once [/ref]
value="Server=localhost;UID=sa;PWD=secret;Database =myDB" /> [/ref]