You can try to store your connection strings in external .config file and include it in both web.config files. Here is how to export profile configuration into a dedicated configuration file.
This is web.config:
...
<system.web>
...
<profile configSource="profile.config" />
...
</system.web>
...
This is profile.config:
<profile>
<properties>
<add name="Name" type="String" />
<add name="Age" type="Int32" />
</properties>
</profile>
Make sure you use .config as the extension of your files so they cannot be served to the browser.
See this blog post for details
To use one .config file in multiple applications create a symbolic link to that file in each application folder and reference that link in web config. Use mklink command in elevated command prompt:
cd "c:\YourApplicationDirectoryWhereWebConfigIs"
mklink profile.config "c:\YourSharedConfigFilesDirectory\profile.config"