cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ajh_ax
Level 3

Installing application on non default IIS Web Site.

Hi everyone!
I have the InstallScript project created with InstallShiel 2009 Premier (v.15. SP2), it targets Win. 2003 and 2008 server. Because IIS 7 haven’t ADSI installed by default, I decide to try InstallShield IIS support features instead of my old good scripts.
Setup task - install application files in IIS virtual directory on existing Web Site.
User could choice one of existing sites from UI and provide data to be used to create Virtual directory and physical folder to be mapped to this Virtual Dir. UI resolve all required IIS information:
Web Site name, Id and RootFolder ( for ex. m_strWebSite, m_strWebSiteNr, m_strSiteRoot)
Virtual Directory name and it’s physical folder path for ex. is m_strVirtDir and m_strPhysDir.

Web site properties in IIS design panel set to use substitute variables:
Web Site name:
Site number:
Site Home Directory:
Virtual Directory name:
Application name: (same as VirtDir)
Virtual directory local path:
Both have the same required Installation Component assigned
After collecting of required data I perform Substitution using code:
TextSubSetValue("", m_strWebSite, TRUE);
TextSubSetValue("", m_strWebSiteNr, TRUE);
TextSubSetValue("",m_strSiteRoot, TRUE);
TextSubSetValue("", m_strVirtDir, TRUE);
TextSubSetValue("", m_strPhysDir, TRUE);
Substitution performed properly, I have check that in setup log (.ilg) file.
During installation setup already creates specified Virtual directory under Default Web Site, physical directory structure is correct.

As alternate solution I have tested simple setup with one component and explicitly set non default Web Site name and ID (number). Virtual directory name also was set explicitly. This setup also creates Virtual Directory under default Web Site :confused: .

Any ideas ?
Labels (1)
0 Kudos
(4) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

Using a site number different than any existing site number should allow a new website to be installed. What point in your script is the IIS_SITE_NR text sub being set? What site number are you testing with?

Also, what port number is set in the website contained in your project?
0 Kudos
ajh_ax
Level 3

Thanks for your reply Josh.

As I mean, the was replaced with user selected, existing site number, let’s say 2. IIS port number in design pane was set to 0, and wasn’t changed during setup. According InstallShield documentation topic Configuring the TCP Port and Site Numbers, this meet item 1 of table. Unfortunately it does not working for me.
I have my setup to work properly only by dynamic setting the Port Nr. I set Port Number in design pane to and substitute it during setup with port of site, selected by user. Looks like Site Number does not work as described in documentation 😞 .
Is it a bug? Or may be described rules valid only when Port and Site numbers was set during setup design?
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

If the website containing your virtual directory in the IIS view in your project has a port number of 0, then the behavior you are seeing is correct. When the port number is set to 0, the site number is unused and the IIS runtime functionality installs any virtual directories to the first site number on the machine (usually 1, the default site). If you change the port number to 80, and specify a site number that does not exist on the machine, a new website will be installed to port 80 and the site number provided. You can also install a new site by specifying a port number that is unused by any existing website.
0 Kudos
JimmiLee
Level 6

Sorry to barge in . . .
I'm installing a VD to a specific folder in an existing web site (ISV folder of the Microsoft Dynamics CRM web site), but then what site number should I set it too? On my test machine it's site number 2, but on an arbitraty machine how can I know?
0 Kudos