This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Updating web.config's
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 07, 2008
02:10 PM
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
In our project we have 2 web.config files in seperate folders.
I have specified the path of both folders example:
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
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 07, 2008
07:51 PM
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 )
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 )
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 11, 2008
02:06 PM
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.
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.