rn-pro
Posts: 48
Joined: Thu Jun 16, 2011 10:27 am

IIS ApplicationPool Issue on product update

Hello,

We're creating on the first installation of our product an IIS-ApplicationPool which can be afterwards modified by the customers using the IIS-Manager. (the customer might change the security settings for example.)
It seems for me that on upgrading our product, the IIS Application Pool ist first of all removed and after that is created again using the standard settings we defined in our project, but this way all the settings the customer made in IIS-Manager are lost.

Does it exist any way to prevent the deleting of the Application-Pool in such a case?

Thank you very much,
Razvan
Bogdan
Posts: 2792
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: IIS ApplicationPool Issue on product update

Hi Razvan,

If your package contains only the application pool then you can try the following settings:

-- in the old package go to Table Editor page and locate InstallExecuteTable
-- here you will find the action "AI_IIsUninstall" with the condition "(VersionNT >= 500) AND (REMOVE="ALL")"
-- edit the condition field and set it to:

Code: Select all

(VersionNT >= 500) AND (REMOVE="ALL") AND (NOT UPGRADINGPRODUCTCODE)
-- also, very important, in the new package, i.e. new version, in the "Error Policy" group of the application pool should be set to "Skip item installation"

This will make the package to not uninstall anything installed from the IIS page if an upgrade is in progress.
Please note that if you have an other web sites or virtual directories in the package these will not be removed either.

Let us know if you have any questions.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rn-pro
Posts: 48
Joined: Thu Jun 16, 2011 10:27 am

Re: IIS ApplicationPool Issue on product update

Thank you very much Bogdan, your tip solved my problem :).
rn-pro
Posts: 48
Joined: Thu Jun 16, 2011 10:27 am

Re: IIS ApplicationPool Issue on product update

Hi Bogdan,

usíng your tip everything worked fine, except the following scenario: (it can be reproduced with a little test project).

I've installed the version 1.0 of our app. If I test at thios point the deinstallation the IIS-Objects are correctly removed.
I define the version 2.0 as a major upgrade (without side by side installs activated). If I install the version 2.0, the IIS-Objects won't be touched (correct, this is what I expect). At this point however, if I deinstall the version 2.0, the IIS-Objects are not removed any more.

Could I manage somehow to get the IIS-Object removed after the deinstallation of the version 2.0?

Thank you very much,
rn-pro
Bogdan
Posts: 2792
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: IIS ApplicationPool Issue on product update

Hi Razvan,

The execution condition should block it from executing only during upgrade. I am not sure why its no remove for the scenario you've presented. Can you please create a verbose log and post it on the forums, or send it by e-mail?

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rn-pro
Posts: 48
Joined: Thu Jun 16, 2011 10:27 am

Re: IIS ApplicationPool Issue on product update

Hi Bogdan,

As attachment my test-projects and the verbose log for installing version 1, upgrading to version 2 and uninstall of the version 2.

Thank you very much,
Razvan
Attachments
Forum-Adv-Installer.rar
(55.3 KiB) Downloaded 319 times
Bogdan
Posts: 2792
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: IIS ApplicationPool Issue on product update

Hi Razvan,

I had to study a little bit more our IIS support to understand exactly why the web apps are not removed by the second package. What happens is that
our installer keeps track of the resources installed/skipped and removes only the ones installed by itself. So in your case, it see the website was skipped during the install, and it skips its uninstall operation too.

The only option you have is to define a small custom action that will remove the website upon a clean uninstall.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rn-pro
Posts: 48
Joined: Thu Jun 16, 2011 10:27 am

Re: IIS ApplicationPool Issue on product update

Hi Bogdan,

your IIS-Support was the main reason why we bought Advanced-Installer. The BrowseIIS function was really nice for us because we didn't have to take care of all IIS-Versions.

As you already have the DeleteIISObject function internal, do you see any chance that in a future release, the same like the BrowseIIS function works, to offer us also this Delete<IISObject> function?

Thank you very much,
Razvan
Bogdan
Posts: 2792
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: IIS ApplicationPool Issue on product update

Hi Razvan,

I've added this on our list but its priority is very small because no other users have requested and its quite easy to implement using our predefine custom action "Launch file or open URL" to which you simply set the "Command Line" field to something like this:

Code: Select all

iisweb /delete WebSite [WebSite...] [/s Computer [/u [Domain\]User/p Password]]
For the first half of this year we already have other plans of improvements for IIS, requested by a lot of users, which I am sure you will need too.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”