Re-install does not update web.config (xml file) - Advanced Installer Community
Kost
Posts: 9
Joined: Tue Jun 04, 2013 9:40 pm

Re-install does not update web.config (xml file)

Hello,

Here is my scenario:
My installer has a combo box with a few options in it, lets say the values of those options are ENV1and ENV2. The property (MY_COMBO) on the combo box gets updated depending on what is selected and I use that property to update my web.config file in my install package. The attribute in my web config looks like this: Service.[MY_COMBO].config

My Installer installs a service that uses a certain configuration depending on what option was chosen in the combo box.

Everything works perfectly fine on a First Time Install, the problem is when I try to reinstall/modify the current installation. In the Maintenance installer I choose Modify, which I have customized it to take in the selection of a combo box with the same property as before called MY_COMBO so it can update web.config file. On the VerifyReadyDlg I added the event "Reinstall one or more features" to the Install button with an argument of ALL.(not sure if I should be doing it this way) However, the config file is not getting updated with the new value. I generated a log when doing this and in the log it says it is modifying the MY_COMBO property with the correct value. I just do not know why the file does not change.

I figured the reinstall would workbest for stopping the service, updating the config file, and then starting the service again using the updated config file. Is there an easier way of going about this?

Appreciate any help. Thanks.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Re-install does not update web.config (xml file)

Hi,

I've tested your scenario and it worked well to me. Can you please send us the .AIP (project file) and a verbose log of the installation so we can investigate them?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Kost
Posts: 9
Joined: Tue Jun 04, 2013 9:40 pm

Re: Re-install does not update web.config (xml file)

Hi Eusebiu,

Is there an email I can mail these files to directly?

Thanks,
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Re-install does not update web.config (xml file)

Hi,

Yes, you can send them to support at advancedinstaller dot com.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Re-install does not update web.config (xml file)

Hi,

I looked over your .AIP (project file) and I found that you enabled the "Is identifier attribute" option for the attribute that contains the "[MY_COMBO]" property. Unfortunately, an identifier attribute cannot be updated, but this option is usually needed when more XML elements with the same name are created under the same parent. So, I think that you can uncheck that option and everything will be alright.

If you think that option is mandatory for your XML element, please let me know and I will think for an workaround.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Kost
Posts: 9
Joined: Tue Jun 04, 2013 9:40 pm

Re: Re-install does not update web.config (xml file)

Thanks Eusebiu that fixed it!
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Re-install does not update web.config (xml file)

You're welcome. I'm glad you got this working.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”