two connection strings in web.config? - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

flipperyfish
Posts: 2
Joined: Sat Mar 23, 2013 8:47 pm

two connection strings in web.config?

Hi,

I have 2 connection string in a web.config file, they have different names and are displayed as seperate nodes when i import them as xml. In the XML Editor I can see the "name" attribute has the 2 different values.

However, when I run the installer the web config that is created has the same "name" attribute for both connection strings. For example:

Source web config xml has
...
<add name="ConnectionStringName_1" ...
<add name="ConnectionStringName_2" ...
...

after installation web config shows

...
<add name="ConnectionStringName_1" ...
<add name="ConnectionStringName_1" ...
...

What are the correct settings to prevent this from happening? I've tried various things but not managed to get it to work yet :(

I think it is happening because the element name is "add" for all connection strings.
flipperyfish
Posts: 2
Joined: Sat Mar 23, 2013 8:47 pm

Re: two connection strings in web.config?

as usual 5 minutes after posting i found the answer :D

I needed to set the name attribute as the identifier attribute

Return to “Common Problems”