Dears,
I'm trying to overriding the XML web.config of my ASP.NET application. It is working but I want to backup and restore some of the tags. I followed this thread to do this:
http://www.advancedinstaller.com/forums ... =2&t=19513
I've made:
1. The web.config file is on isolated component marked as "permanent"
2. I use the installation type "uninstall old version first and then install new version"
3. The web.config file is marked as "override only if existing file is older" (If I try to mark it as "not override" it is no possible to update it with XML Update)
4. I'm using Advanced Installer 10.3
5. I use a XML Search to store a value of the web.config in a property AGENTWS_URL
6. I use an XML update to recover the data from the property AGENTWS_URL
The XML Search is working if I use a static path, in my case, I use "C:\inetpub\wwwroot\webagent\Web.config" on the "File Path" of the search. With this path, when I make and installation the web.config preserves the data. But I can not use a static path because it is possible to change the installation path. So I
used the path [webagent_Dir] that is supposed to be the destination path selected during the installation. With this dynamic path the property is not updated. I've made a log of my test.
LOG with static path (it works):
MSI (c) (30:78) [14:27:12:273]: Doing action: AI_XmlLocator
Action 14:27:12: AI_XmlLocator. Executing XML locators
Action start 14:27:12: AI_XmlLocator.
MSI (c) (30:3C) [14:27:12:277]: Invoking remote custom action. DLL: C:\Users\presence\AppData\Local\Temp\MSIB35B.tmp, Entrypoint: OnXmlLocator
AI_XmlLocator: Executing XML file: "C:\inetpub\wwwroot\webagent\Web.config" locators
MSI (c) (30!EC) [14:27:12:354]: PROPERTY CHANGE: Deleting AGENTWS_URL property. Its current value is ' '.
Action ended 14:27:12: AI_XmlLocator. Return value 1.
LOG with dynamic path (it fails):
MSI (c) (78:8C) [14:19:20:556]: Doing action: AI_XmlLocator
Action 14:19:20: AI_XmlLocator. Executing XML locators
Action start 14:19:20: AI_XmlLocator.
MSI (c) (78:DC) [14:19:20:559]: Invoking remote custom action. DLL: C:\Users\presence\AppData\Local\Temp\MSI80B7.tmp, Entrypoint: OnXmlLocator
Action ended 14:19:20: AI_XmlLocator. Return value 1.
Best regards,
Mario
FOLLOW US
Get the latest news in Application Packaging