Arpad
Posts: 5
Joined: Fri Mar 16, 2012 9:30 am

IIS configuration fails on installation with v9.8

Hello,

We have encountered an issue in the 9.8 version. Our installer package caters for an ASP.NET application thus configures IIS on installation. It used to work in previous versions, but since we upgraded to 9.8 it stopped working. We tried with several different projects, we get the same results with all of them.

Please see a screenshot attached. This is what we get when we run the installer: it fails at the stage of configuring IIS, then it rolls back. We looked at the installer logs as well but they don't tell us anything useful.
Any clues? Is this a known issue? If you need more information, please let us know.

Thanks,
Arpad
Attachments
screenshot
screenshot
Capture.JPG (47.72 KiB) Viewed 9666 times
Arpad
Posts: 5
Joined: Fri Mar 16, 2012 9:30 am

Re: IIS configuration fails on installation with v9.8

I took a copy of the log file the installer creates during this failed installation, and sent it to you at support at advanced installer dot com.
I hope it helps.

Regards,
Arpad
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: IIS configuration fails on installation with v9.8

Hello Arpad,

I'm afraid the log file you have sent to us doesn't offer enough details about the root cause of this issue. I've sent you an email containing a debug version of a dll which will help you to generate a more detailed log file.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Oleksandr
Posts: 15
Joined: Tue Dec 04, 2012 11:09 am

Re: IIS configuration fails on installation with v9.8

Dear Daniel,

Based on the last version of the log file Arpad sent you that we managed to generate with the debug version of iis.dll we figured out that installer fails to commit to path 'MACHINE/WEBROOT/APPHOST/{APPLICATION}', where {APPLICATION} is our application name.
Below please find the small description of our installer:
1. The installer creates the new Web site and the new Web application under it
2. During the installation end-user selects the configuration to be installed
3. Based on the selected configuration the Web.config file (taken from the Development environment) is replaced with the specific Web.config containing required configuration
4. This specific Web.config file is taken from the folder that has "Install folder content into the parent folder" check-box checked

Looking more thoroughly we discovered the following:
1. The original Web.config file taken from Development environment (please, see explanation above) isn't read-only
2. But the specific Web.config file the replaces the original one is read-only (it's retrieved from TFS during the automatic build process)

Thus if I uncheck read-only attribute for the specific Web.config file and build the *.aip project again and then try to install, installation succeeds.
But during the installation the Web.config file gets updated with the following line:
<identity impersonate="false" password="" userName="" />

And that was the main reason why installation failed before (Web.config file needs to be updated, but it's read-only).

But comparing to the previous version of Advanced Installer (I mean 9.7), Web.config file wasn't updated with this extra line.
Would you be so kind to let us know if it possible to omit this updating somehow, since we don't use impersonation?
Thank you.

Kind regards,
Oleksandr
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: IIS configuration fails on installation with v9.8

Hello Oleksandr,

Indeed, this seems to be an Advanced Installer issue. A fix will be available in a future version of Advanced Installer, thank you for bringing it to our attention. Until then, as a workaround I've sent you a fixed dll to Arpad's email address.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Oleksandr
Posts: 15
Joined: Tue Dec 04, 2012 11:09 am

Re: IIS configuration fails on installation with v9.8

Dear support,

We tested the dll you sent us, but, unfortunately, we found another problem.
For the current moment the installation succeeds, but the Web.config file isn't replaced with the specific one from the configuration folder (please, see my explanations above).
Could you please assist us with that?
Looking forward to your reply.
Thank you.

Kind regards,
Oleksandr
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: IIS configuration fails on installation with v9.8

Hello Oleksandr,

Please give us some time to investigate this and we'll get back to you as soon as we have a conclusive answer.

Thank you for your patience and understanding.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: IIS configuration fails on installation with v9.8

Hello Oleksandr,

Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them? Also, can you tell us if you were able to successfully update the related web.config file using version 9.7 of Advanced Installer?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Oleksandr
Posts: 15
Joined: Tue Dec 04, 2012 11:09 am

Re: IIS configuration fails on installation with v9.8

Dear support,

I am sorry for such a late response.
Unfortunately, I can't provide you with *.aip project file and verbose log because I had to come up with a quick solution for that issue and I developed a work-around based on the last successfully working *.aip file we had.
But, I'd like to mention a couple of problems and I faced while struggling to make it work.
So:
1. One of our installers is used to install the Web application in IIS. And it also places the Web application files on the file system.
Our Web application is pre-compiled during the build, but it is updatable. Thus we have a lot of files like *.ascx, *asax, etc. on the file system.
We use the option "Synchronize content with folder from disk" in *.aip project file for the folder containing his Web application.
But if we go to the Features ("Organization" pane in *.aip), we'll see a lot components with strange names based on file names in the Web application which are picked up randomly.
Questions: is it necessary to store the references to all these files in *.aip project file and add a lot of components based on that information since the Web application folder is marked as "Synchronized"?
It is big issue for us since the Web app is constantly updated by developers, and I need to open the *.aip project from time to time to keep it up-to date with the latest content.
Wouldn't it be easier to make Advanced Installer pick up its contents automatically while building and add to the MSI file?

2. We have a bunch of sub-folders under the parent Web app folder on the "Files and Folders" pane in the *.aip project file.
All of these sub-folders contain only log4net.config and Web.config files, also they are marked as "Synchronized" too and have "Install folder content into the parent folder" option checked.
For every of these folder the component with specific name is created. Every component has its Install Condition set based on the value selected on UI.
Thus during the installtion end-user selects proper configuration and both log4net.config and Web.config files are placed into the Web application root folder replacing the existing ones (this is the step where we faced with a problem when installation failed because the Web.config file from configuration sub-folder was read-only).
To overcome the problem in item 1 we tried the following: we deleted the entire contents of the folder (that is marked as "Synchronized" in our *.aip project file) from file system.
Then we reopened it, thus we reduced its size drastically and a lot of components (see item 1) were removed too (automatically).
Then we checked-in the *.aip project file into TFS, thus it was retrieved and built by the next build process.
Then we tried to install it and figured out that neither Web.config nor log4net.config were replaced.
In other words, the Install Condition wasn't evaluated properly.
We also tried to remove the contents of all these sub-folders from the file system. The result was the same.
Questions: is it expected behavior? Why isn't the Install Condition evaluated or even why isn't it taken into account?
How can we make Advanced Installer add "Synchronized" folders without producing a lot of components (we are curious why it is produced at all since the folder content should be synchronized while building and who knows what the content can be)?

3. Based on items 1 and 2 we decided to keep everything in the *.aip project file as it was.
But since a lot of components were generated we decided to rename them according to the folder's structure (e.g. if the parent folder named Web contains sub-folder named UserControls, the component was named Web_UserControls, if a sub-folder was named App_Themes, then the component was renamed to Web_App.Themes, etc.).
After renaming and reorganizing all the components, we build the project file again and noticed that new components containing only folders were added.
These components were named like Config_1, Config_2, etc. We moved these resources to appropriate components, but after building they appeared again.
We decided that the names of these components were generated baed on each folder's identifier that can be seen on the Properties dialog box.
Thus we renamed all the indetifiers (some of them were renamed in this dialog box, but some of them couldn't be renamed this way, so we opened the *.aip project file in Notepad++ and replaced them accordingly).
Renaming was done following the same rule that was described above for the components (but only adding "_Dir" to the end).
But after building the project file we saw the same components with strange names (like Config_1, Config_2) in the features.
Moreover, the Web.config and log4net.config files weren't replaced during the installation.
Questions: is there any rule how to name components and identifiers? Why some identifiers can be changed in Properties dialog box and some cannot (the folders are exactly the same, I mean synchronized sub-folders containing configuration)?

4. Besides we need to set the particular permissions for the APPDIR during the installation (e.g. Full Control for Administrators and Read & Execute, List folder content and Read for both Users and Authenticated Users).
We set these permissions on the APPDIR on the Permissions tab in Properties dialog box and checked "Apply permissions to all subfolders".
These permissions were applied correctly during the installation.
But whenever we add new configuration sub-folder (see item 2) that is synchronized and then open the Properties dialog box on Permissions tab and click OK and reopen again, all the permissions disappear.
We checked the *.aip file in Notepad++ and noticed that it did still contain the information about permission for all the sub-folders, but they were deleted for APPDIR.
In fact, these permissions sometimes disappear even without opening Properties dialog box for APPDIR.
Questions: is it possible to preserve these permissions despite the action being performed?

Looking forward to your reply.
Thank you.

Kind regards,
Oleksandr
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: IIS configuration fails on installation with v9.8

Hello Oleksandr,
1. One of our installers is used to install the Web application in IIS. And it also places the Web application files on the file system.
Our Web application is pre-compiled during the build, but it is updatable. Thus we have a lot of files like *.ascx, *asax, etc. on the file system.
We use the option "Synchronize content with folder from disk" in *.aip project file for the folder containing his Web application.
But if we go to the Features ("Organization" pane in *.aip), we'll see a lot components with strange names based on file names in the Web application which are picked up randomly.
Questions: is it necessary to store the references to all these files in *.aip project file and add a lot of components based on that information since the Web application folder is marked as "Synchronized"?
It is big issue for us since the Web app is constantly updated by developers, and I need to open the *.aip project from time to time to keep it up-to date with the latest content.
Wouldn't it be easier to make Advanced Installer pick up its contents automatically while building and add to the MSI file?
Please keep in mind this is the normal behavior. All resource files added in your project should be included in a component. So, when the synchronization is refreshed all resource files added in your synchronized folder will be automatically included in specific components.
2. We have a bunch of sub-folders under the parent Web app folder on the "Files and Folders" pane in the *.aip project file.
All of these sub-folders contain only log4net.config and Web.config files, also they are marked as "Synchronized" too and have "Install folder content into the parent folder" option checked.
For every of these folder the component with specific name is created. Every component has its Install Condition set based on the value selected on UI.
Thus during the installtion end-user selects proper configuration and both log4net.config and Web.config files are placed into the Web application root folder replacing the existing ones (this is the step where we faced with a problem when installation failed because the Web.config file from configuration sub-folder was read-only).
To overcome the problem in item 1 we tried the following: we deleted the entire contents of the folder (that is marked as "Synchronized" in our *.aip project file) from file system.
Then we reopened it, thus we reduced its size drastically and a lot of components (see item 1) were removed too (automatically).
Then we checked-in the *.aip project file into TFS, thus it was retrieved and built by the next build process.
Then we tried to install it and figured out that neither Web.config nor log4net.config were replaced.
In other words, the Install Condition wasn't evaluated properly.
We also tried to remove the contents of all these sub-folders from the file system. The result was the same.
Questions: is it expected behavior? Why isn't the Install Condition evaluated or even why isn't it taken into account?
How can we make Advanced Installer add "Synchronized" folders without producing a lot of components (we are curious why it is produced at all since the folder content should be synchronized while building and who knows what the content can be)?
I'm not sure why you are encountering this behavior. Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

3. Based on items 1 and 2 we decided to keep everything in the *.aip project file as it was.
But since a lot of components were generated we decided to rename them according to the folder's structure (e.g. if the parent folder named Web contains sub-folder named UserControls, the component was named Web_UserControls, if a sub-folder was named App_Themes, then the component was renamed to Web_App.Themes, etc.).
After renaming and reorganizing all the components, we build the project file again and noticed that new components containing only folders were added.
These components were named like Config_1, Config_2, etc. We moved these resources to appropriate components, but after building they appeared again.
We decided that the names of these components were generated baed on each folder's identifier that can be seen on the Properties dialog box.
Thus we renamed all the indetifiers (some of them were renamed in this dialog box, but some of them couldn't be renamed this way, so we opened the *.aip project file in Notepad++ and replaced them accordingly).
Renaming was done following the same rule that was described above for the components (but only adding "_Dir" to the end).
But after building the project file we saw the same components with strange names (like Config_1, Config_2) in the features.
Moreover, the Web.config and log4net.config files weren't replaced during the installation.
Questions: is there any rule how to name components and identifiers?
Please keep in mind that component names and folders identifiers should be unique.
Why some identifiers can be changed in Properties dialog box and some cannot (the folders are exactly the same, I mean synchronized sub-folders containing configuration)?
Indeed, this seems to be an Advanced Installer limitation. A improvement will be included in a future version of Advanced Installer, thank you for bringing this to our attention.

4. Besides we need to set the particular permissions for the APPDIR during the installation (e.g. Full Control for Administrators and Read & Execute, List folder content and Read for both Users and Authenticated Users).
We set these permissions on the APPDIR on the Permissions tab in Properties dialog box and checked "Apply permissions to all subfolders".
These permissions were applied correctly during the installation.
But whenever we add new configuration sub-folder (see item 2) that is synchronized and then open the Properties dialog box on Permissions tab and click OK and reopen again, all the permissions disappear.
We checked the *.aip file in Notepad++ and noticed that it did still contain the information about permission for all the sub-folders, but they were deleted for APPDIR.
In fact, these permissions sometimes disappear even without opening Properties dialog box for APPDIR.
Questions: is it possible to preserve these permissions despite the action being performed?
This may be caused by a recent bug in Advanced Installer which has been fixed in our latest version (9.9). So, can you test the scenario using latest version (9.9) of Advanced Installer and see if the behavior still reproduces?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”