cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
garypaquette
Level 4

Updating web.config's

I have an InstallShield project using IS2008.
In our project we have 2 web.config files in seperate folders.
I have specified the path of both folders example:
\app1
\app2

In using the XML File Changes I have configured this to update the appropriate AppSettings within the files.

Problem:
Regardless of what I do - only the first web.config gets updated and never the second one from the other folder.

Any ideas???
Can it be an issue that both are called web.config?

Help.... only part left in my installer to ship it out!

Gary
Labels (1)
0 Kudos
(2) Replies
Christopher_Pai
Level 16

I think you are asking the same question as this thread:

http://community.installshield.com/showthread.php?t=176416

The short answer is each web.config has to have it's own XPath statement.

1) The only other altenatives would be to write a custom action to create a collection of files and iterate through them applying the same XPath statement.

2) Have your dev team rfefactor the application to externalize the change into a common file and share it across web apps. ( For example, my SaaS product has 80+ webservices that all call a commonweb.config to get the ADO.NET Connection Settings )
0 Kudos
garypaquette
Level 4

Looks like I found the solution if this happens to others...
If you have 2 web.config (or more) files that have the SAME name in different folders the problem in IS2008 is it creates the components with the same names. Since it then gets "confused" at that point it will only process the first component or XML file change.
If you rename and insure that the component names are different then you are good to go and the files will get updated.
IS2008 should not allow this to happen and I would consider this a bug in the product. But at least there is a work-around.
0 Kudos