Hi folks!
I've stumbled across a strange behaviour in the handling of IIS Application Pools in IIS7 (Win2K8).
My installer creates three Virtual Directories in/under Default Web Site and also creates an individual application pool for each of these directories.
This is working fine, no problems here.
Note: Default Web Site is bound to "DefaultAppPool" and points to "c:\inetpub\wwwroot".
If I now run an upgrade the "Previous Version Uninstallation" step is invoked. This uninstalls the previous installed package and the virtual directories are removed and recreated as one could expect.
But after this, automatic, upgrade the Default Web Site is now bound to one of newly created application pools (the last one created of the three ...) and also uses this virtual directory's physical path (!)
If I instead decide to uninstall/reinstall the whole package instead of "upgrading" it all is ok and Default Web Site is never touched.
Running IA 10.10
IIS7 & Application Pools
Re: IIS7 & Application Pools
Dear Bjarne,
When you re-run the setup, your script runs normally (the MSIcode is executed).
I would suggest debugging this step by step to narrow down the problem - once you do please let me know.
When you re-run the setup, your script runs normally (the MSIcode is executed).
I would suggest debugging this step by step to narrow down the problem - once you do please let me know.
Aviv Giladi
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: IIS7 & Application Pools
Thanks for the reply.
IA is not installed in a Win2K8 box so I can't debug it from there I'm afraid, the problem occurs only in customer machines.
Any suggestions on how to solve this (100% reproducable in Win2K8...)?
IA is not installed in a Win2K8 box so I can't debug it from there I'm afraid, the problem occurs only in customer machines.
Any suggestions on how to solve this (100% reproducable in Win2K8...)?
Re: IIS7 & Application Pools
Dear Bjarne,
The thing is that there is no difference between uninstalling and upgrading, because essentially when you upgrade your are uninstalling and then installing again.
When you uninstall your software and then install it again (not by upgrading) - does this reproduce?
The thing is that there is no difference between uninstalling and upgrading, because essentially when you upgrade your are uninstalling and then installing again.
When you uninstall your software and then install it again (not by upgrading) - does this reproduce?
Aviv Giladi
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: IIS7 & Application Pools
Yes, its 100% reproducible.
- The problem never occur when uninstalling and reinstalling the same package.
- The problem always occur when upgrading and "previous version installation" step is invoked.
- The problem never occur when uninstalling and reinstalling the same package.
- The problem always occur when upgrading and "previous version installation" step is invoked.
Re: IIS7 & Application Pools
Dear Bjarne,
Interesting, because upgrading essentially means uninstalling and installing again.
Perhaps take a look at the part of your MSIcode that handles the upgrade (the part that checks if a previous version is installed and removes it) - could there be that there is something wrong with the code there that is causing this?
Interesting, because upgrading essentially means uninstalling and installing again.
Perhaps take a look at the part of your MSIcode that handles the upgrade (the part that checks if a previous version is installed and removes it) - could there be that there is something wrong with the code there that is causing this?
Aviv Giladi
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: IIS7 & Application Pools
Yep, really interesting indeed.
The PVU runs "Install/Remove MSI Package" whilst the "Remove" option in the maintenance dialog runs "ApplyUninstall".
One thing is 100% certain - the behaviour is -not- the same.
I think IA have to take a close look at this as it most probably is not the expected behaviour.
Another closely related issue is the fact that an Application Pool created by "Create Virtual Folder" never gets removed during uninstall (maybe an issue for a separate thread?)
The PVU runs "Install/Remove MSI Package" whilst the "Remove" option in the maintenance dialog runs "ApplyUninstall".
One thing is 100% certain - the behaviour is -not- the same.
I think IA have to take a close look at this as it most probably is not the expected behaviour.
Another closely related issue is the fact that an Application Pool created by "Create Virtual Folder" never gets removed during uninstall (maybe an issue for a separate thread?)
- Attachments
-
- Previous Version Uninstallation
- IA_PVU.png (173.59 KiB) Viewed 14374 times
Re: IIS7 & Application Pools
Eventually I got is sorted out and a quite nasty workaround is in place.
"Create Virtual Folder" command behaves quite strange when the folder already exists.
In my case the virtual folder was created under "Default Web Site" causing "Default Web Site" to be updated with same values as the virtual folder;
The application pool and physical path were copied from the virtual directory causing all kinds of problems for the Default Web Site
When uninstalling the application in maintenance mode "Delete Virtual Folder" (before Apply Uninstall) is called but this is not the case in PVU where "Install/Remove MSI Package" is invoked which never deletes the folders. I'm not even sure if this is a valid place for calling "Delete Virtual Folder"?
What I've done for now is simply to call "Delete Virtual Folder" before calling "Create Virtual Folder". Ugly? Sure!
Another thing is the use of "aspnet_regiis.exe -s" commmand which is executed by "Create Virtual Folder" in order to set proper asp.net version.
I believe this is deprecated in Win2K8/IIS7, you might have a look at that also perhaps, 'Appcmd.exe' might be an alternative...
"Create Virtual Folder" command behaves quite strange when the folder already exists.
In my case the virtual folder was created under "Default Web Site" causing "Default Web Site" to be updated with same values as the virtual folder;
The application pool and physical path were copied from the virtual directory causing all kinds of problems for the Default Web Site
When uninstalling the application in maintenance mode "Delete Virtual Folder" (before Apply Uninstall) is called but this is not the case in PVU where "Install/Remove MSI Package" is invoked which never deletes the folders. I'm not even sure if this is a valid place for calling "Delete Virtual Folder"?
What I've done for now is simply to call "Delete Virtual Folder" before calling "Create Virtual Folder". Ugly? Sure!
Another thing is the use of "aspnet_regiis.exe -s" commmand which is executed by "Create Virtual Folder" in order to set proper asp.net version.
I believe this is deprecated in Win2K8/IIS7, you might have a look at that also perhaps, 'Appcmd.exe' might be an alternative...
Re: IIS7 & Application Pools
Dear Bjarne,
I am glad you found a workaround. Thank you for your input. It will definitely be taken into account!
I am glad you found a workaround. Thank you for your input. It will definitely be taken into account!
Aviv Giladi
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: IIS7 & Application Pools
I am experiencing exactly the same issue and have found the same workaround.
HOWEVER, if you attempt a Repair on the installation, the issue occurs again and the Default Web Site is bound to my Application Pool.
Is there a way to detect if a Virtual Folder exists so that we can skip the call to Create Virtual Folder which seems to corrupt to Default Web Site when the Virtual Folder exists already?
HOWEVER, if you attempt a Repair on the installation, the issue occurs again and the Default Web Site is bound to my Application Pool.
Is there a way to detect if a Virtual Folder exists so that we can skip the call to Create Virtual Folder which seems to corrupt to Default Web Site when the Virtual Folder exists already?
Re: IIS7 & Application Pools
Not builtin in IA, but you an achieve this by invoking the IIS command line mangament tools with the Run Program command.
Aviv Giladi
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

