Of course you can't put running code into the web.config. That wasn't what I
mentioned.
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_" &
Environment.MachineName)
--
Teemu Keiski
MCP,Designer/Developer
Mansoft tietotekniikka Oy
http://www.mansoft.fi
AspInsiders Member, www.aspinsiders.com
ASP.NET Forums Moderator, www.asp.net
AspAlliance Columnist, www.aspalliance.com
"Kenneth" <se> kirjoitti viestissä
news:095f01c366ec$67b9f120$gbl...
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.
/Kenneth
name of the machine.
respectively) based on
production machine once [/ref]
value="Server=localhost;UID=sa;PWD=secret;Database =myDB" /> [/ref]
PW`?
>
>
>.
>[/ref]
Bookmarks