cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Not applicable

How do you prevent InstallShield 2008 from changing the web.config file

Hi,

I'm hoping that someone can help me solve this issue that I am having.

I have a web.config file that is being installed on both XP and Vista machines. On the XP machine, the web.config file is being left alone. That is, the web.config file that we have set up is installed correctly without being modified.

But on the Vista machine, the web.config file is being change.. that is, the installer (BTW, it is a basic msi project) opens the web.config file after it is written to the folder and modifies it. So, my question is: How do you prevent this modification from happening?

I was going to try:

1. Re-copying the web.config file over the web.config file that is modified by the installer, but this might cause problems during uninstallation b/c the count on the component will be 2 in the registry.

2. Not copying the web.config file during installation, so that InstallShield can't find the file for modification and then copying the file near the end of the execution phase

Any ideas or suggestions is greatly appreciated.

Sincerely,
Thomas

This problem did not occur in previous versions of InstallShield. I upgraded a previous project from InstallShield 12 to InstallShield 2008. (It seems InstallShield 2008 introduce numerous options/extras that is now causing me headaches.):(
Labels (1)
0 Kudos
(2) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

Are you using the IIS functionality to install a virtual directory? If you are, the way our IIS custom action installs virtual directories (and websites, application pools) on IIS 7 will result in the web.config file being modified to set various properties associated with the virtual directory (for example, the default document). This has become somewhat problematic on Windows 2008 Server since there are some properties that now cannot be overridden at the web.config level. We have changed the behavior to set some of these properties at the applicationhost.config level instead.

You could revert back to the old IIS behavior that IS 12 had by adding a property to your project called IISPREFERLEGACYOBJECTS with a value of 1. However, this will then require IIS 6 metabase compatibility be installed on the target Vista machines for the install to work correctly.

If you aren't using the IIS functionality, the only other possible item that would cause a web.config file to be modified would be using the XML file changes view. This will not happen unless you had imported/created the web.config file in the XML file changes view.
0 Kudos
Not applicable

joshstechnij wrote:
Are you using the IIS functionality to install a virtual directory? If you are, the way our IIS custom action installs virtual directories (and websites, application pools) on IIS 7 will result in the web.config file being modified to set various properties associated with the virtual directory (for example, the default document). This has become somewhat problematic on Windows 2008 Server since there are some properties that now cannot be overridden at the web.config level. We have changed the behavior to set some of these properties at the applicationhost.config level instead.

You could revert back to the old IIS behavior that IS 12 had by adding a property to your project called IISPREFERLEGACYOBJECTS with a value of 1. However, this will then require IIS 6 metabase compatibility be installed on the target Vista machines for the install to work correctly.

If you aren't using the IIS functionality, the only other possible item that would cause a web.config file to be modified would be using the XML file changes view. This will not happen unless you had imported/created the web.config file in the XML file changes view.


Thank you for your prompt reply to my problem. Yes, we are using IIS functionality to install a virtual directory. Prior to upgrading our projects from InstallShield 12 to InstallShield 2008, we never had a situation where the web.config file getting changed. It is no problem if it does get change, but our testers will have to spend weeks re-testing the installers on various OSes...which can be a great deal of problem for us. I will try the IISPREFERLEGACYOBJECTS property that you have mentioned.

Other issues have came up...I believe it was during the importing of InstallShield 12 projects into InstallShield 2008.

Thus, since our projects were originally created using InstallShield 12...we are in the process of setting that version of InstallShield on another machine and creating our builds using that legacy version.

Again, thank you for your help. I really appreciate it.
0 Kudos