"Girish" wrote:
I have two application running in one server, both have same
sqlserver connection strings in their web.config files. i want to
combine both connection strings in one config file.
please suggest me, can i implement those connection strings in
machine.config file and use connections from their.
i have tried it, but unable to implement
Please help.
Thanks,
Hi Girish,
Yes, you can set common connectionstrings in Machine.Config
In fact, I found one there already, accessible to both windows and web
applications
ConnectionStringSettings conn =
ConfigurationManager.ConnectionStrings["LocalSqlServer"];
Remember to put it on the configuration level
<configuration>
<connectionStrings>
<add name="LocalSqlServer" connectionString="..."
providerName="System.Data.SqlClient"/>
</connectionStrings>
</configuration>
--
Happy Coding!
Morten Wennevik [C# MVP]