cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
MNSwiftOne
Level 4

IIS Help needed: IS Creates one site in IIS 5 and two in IIS 6???

I am having trouble getting my project configured right for XP and Server 2003 targets.
This is an old, large MSI Installscript installer migrated from 9,10,11,12,2008 and now 2009. The basic installation works fine, as designed for XP.
But - when I install to Windows Server 2003 I end up with quite a different configuration.
Can someone please tell me what I have wrong - or what to do to fix this i.e. maybe split into two web sites with feature conditional on target system???

This is how the Installer is set up:
Server Configuration:
Click Web Sites:
right side: Restart after: yes, SSIENableCmd...: Ignore

Click site:
General - all blank
Web Site tab:
Description: ProductName, IP address: blank, TCP Port:80, Host: blank, Site Number: 0
Home Directory tab:
A directory on this computer, Local Path: folder containing site, all boxes checked except Directory browsing, Application Pool: matches name of added App Pool below.
Directory Security: Enable Anon: both checked and both boxes empty , SSL cert: Not selected

Click Vitual Directory:
General tab: Name: Productname, Component VirtualDirComp
Virtual Directory tab: A directory located on this computer, Local path: same as above folder containing site, All checked again except Directory browsing.


This was not designed by me - and does not look right. It does install correctly on XP with only a virtual dir off of the 'Default Web Site', with a single set of files - loads and runs fine.
But on Server 2003 - I end up with a web site named ProductName (http://localhost) containing all files - and - a virtual directory off that also named ProductName (http://localhost/ProductName) also containing all files - so I end up with two sites, two sets of files and neither site works properly...

Hopefully someone can tell me how this should be arranged. I do not understand why I am getting an actual http://localhost site only on 2003. I have seen some posts here asking how to do only a virtual directory - this sounds like what I want too??? The path in both above point to a Program Files folder containing our product of which only a portion is a web-site.
There has also been problems with permissions, possibly needing to set IIS_WPG permissions - only for 2003?? or maybe the bad config I have is messing this up..?

Thanks,
Todd
Labels (1)
0 Kudos
(2) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

InstallShield's IIS functionality installs a website under the following conditions:
- The port number specified for the site in the project does not exist on the target machine, and the port number is not 0.
- The site number specified for the site in the project does not exist on the target machine, and the site number is not 0.

If the Win2k3 machine you are testing on does not have a site using port 80, the site in your project will be installed to use port 80.

If you want InstallShield to use the first available site found on a target machine, set the port number and site number settings to 0 in the website in your project.
0 Kudos
MNSwiftOne
Level 4

I gave up using the InstallShield IIS interface for Windows Server 2003 and went to use the OLD script way to create just a virtual directory. This works to create the directory but there may still be issues due to application pools?
Do I need to restart IIS after adding a virtual directory web-site???

How can I - via script - create an application pool prior to creating the virtual directory, create the virtua directory, then restart the pool / site to ensure it is up and working???

This problem I just noticed was installing our application without restarting the PC.
Sequence:
1. Install app which created virtual dir.
uninstall application - IIS failed to respond
( either MsiGetProperty (ISMSI_HANDLE, "IIS_VERSION", svContent, nvSize); or
set objIIS_Root = CoGetObject("IIS://localhost/W3SVC/1/Root", "");
failed).
2. Looking at IIS showed a red x and prompted a reconnect.
Is it possible IIS needs some reset or other command to ensure it is restarted?

With reference to joshstechnij response:
This doe NOT work at all - I set the port and site values to 0 and they install as NOTHING - looking at the IIS properties and port - the field is empty - so the site would not start. This may vary between IIS versions or something - but it did not work. Looking at the manual - it states it will accept 0 if I specify a site number - but I don't know how many sites exist so how could I do that? Even if I did - it would not resolve the website AND virtual directory becoming two sites.
Our clients expect - require - the ability to load the site locally or remotely - this is done via http://localhost/appname or //servername/appname where appname is the app name and virtual folder name of our web-site.
This configures perfectly in IIS5 - only in IIS 6 = Server2003 does it install two sites and neither access correctly. I can access the http://localhost site ok - but as I said above - this cannot work, expecially if server already has a site on it. and accessing http:/localhost/appname results in site loading and getting an error that a method in a dll has already been defined (the website root dll was apparently loaded - even though both the siteroot and virtual dir both point to the same virtual dir. I cannot get the site to NOT point to the virtual dir and have this problem.

This BUG is REAL AND REPRODUCABLE - it is, in my opinion a total failure of Installshield to install / configure IIS settings using the built-in functions. The functions should perform identically for IIS5 and IIS6 - they do not.
I searched and found a post by DavidH on 6/8/2007 - more than a year ago:
"You rang? There is already an issue, IOC-000059119, to add the ability to create virtual directories instead of applications."

This still cannot be done in Installshield and is causing failure for our application on this OS version.

layout required:
Default Web Site - no files or site
Default Web Site\Appname - virtual dir pointing to program files\appname containing web-site.

Why is this so hard?
When I get some time I will bug this to InstallShield.

Thanks,
Todd
0 Kudos