Common connectionstrings across all the sites

2019-09-08 16:27发布

问题:

I have multiple sites created on single server. IIS 7 is installed. And All these sites have same connectionstrings. But these are defined in their respective web.config file.

I want to remove these connectionstrings from all the web.config files and set at common location wither in machine.config or some other config file so that all the sites will access the same. Both these applications has different root config files.

  1. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config
  2. C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config

Please suggest on this.