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

Installation hangs when creating virtual directories on Windows Server 2008

We tested out installer on Windows Server 2008 RC0 and it hangs. Based on the log it appears to occur while creating the virtual directories. I also created an installer which simply creates an application pool and virtual directory with the same result. Here is the log:

Action 14:53:22: Progress Custom Action. Creating IIS virtual directories...
Action 14:53:22: Progress Custom Action. Creating IIS virtual directory ePower
1: SetCommitPath for website '' and app ''
1: InstallShield project contains a website with name 'Default Web Site', site number '0', and port '80'. Checking if it exists...
1: GetAdminSection for section 'system.applicationHost/sites' and path 'MACHINE/WEBROOT/APPHOST' and commitpath 'MACHINE/WEBROOT/APPHOST'.
1: Exception caught while searching for site with this port number
1: Website does not exist. Additonal info: Site number '0', Port '80', sBasePath '/LM/W3SVC/', DisplayName 'Default Web Site'
1: GetAdminSection for section 'system.applicationHost/sites' and path 'MACHINE/WEBROOT/APPHOST' and commitpath 'MACHINE/WEBROOT/APPHOST'.


It's worth mentioning that the default website already exists and the same installation is successful on Windows Vista.
Labels (1)
0 Kudos
(32) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

The .NET framework isn't a requirement to use the IIS functionality in InstallShield (everything is implemented through native C++). Any IIS items in your project should install on any machine that has IIS installed.

Can you attach a verbose log of the installation (please indicate which component(s) contain the application pool and virtual directory)? This may contain some additional information as to what is going on during the installation.
0 Kudos
chgruber
Level 4

Thanks for all your help Josh!

Website, BDCWebsite and ContentFolders are the components which own the virtual directories and apppools.
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

It looks like this is a log file for the VC2005 redistributables:
MSI (s) (1C:10) [12:29:37:906]: Executing op: ProductInfo(ProductKey={7299052B-02A4-4627-81F2-1818DA5D550D},ProductName=Microsoft Visual C++ 2005 Redistributable,PackageName=vcredist.msi

You may try logging just your MSI package with the following command line:
setup.exe /v"/l*v C:\PathToLog\MsiLog.log"
0 Kudos
chgruber
Level 4

Sorry Josh - I cannot get that log file to be created.

We only have this problem with SP1 and 2008, it works fine with Vista w/o SP1.

We are actually creating the virtual directories with install script because we need the virtual directories to be named using variables. Here is the script function we are using.


function object W3SVCCreateVirtualDirectory(nvServerId, svVDirName, svFolder, bOverWrite)
string svIIsRootPath;
string svIIsVDirPath;
object oIIsRoot;
object oIIsVDir;
begin
try
Sprintf(svIIsRootPath, "IIS://127.0.0.1/W3SVC/%d/ROOT", nvServerId);
Sprintf(svIIsVDirPath, "IIS://127.0.0.1/W3SVC/%d/ROOT/%s", nvServerId, svVDirName);
set oIIsVDir = W3SVCGetObject(svIIsVDirPath);
if (IsObject(oIIsVDir)) then
if (bOverWrite) then
oIIsVDir.Path = svFolder;
//.SetInfo commits the changs into the IIS meta base
oIIsVDir.SetInfo;
else
SprintfBox(SEVERE, "W3SVCCreateVirtualDirectory", "Virtual directory '%s' already exists for web site '%s' (overwrite flag is FALSE).",
svVDirName, W3SVCGetWebServerName2(nvServerId));
endif;
else
set oIIsRoot = W3SVCGetObject(svIIsRootPath);
if (IsObject(oIIsRoot)) then
set oIIsVDir = oIIsRoot.Create('IISWebVirtualDir', svVDirName);
if (IsObject(oIIsVDir)) then
oIIsVDir.SetInfo;
oIIsVDir.Path = svFolder;
//.SetInfo commits the changs into the IIS meta base
oIIsVDir.SetInfo;
else
SprintfBox(SEVERE, "W3SVCCreateVirtualDirectory", "Virtual directory '%s' was not created for web site '%s'.",
svVDirName, W3SVCGetWebServerName2(nvServerId));
endif;
endif;
endif;
set oIIsRoot = NULL;
catch
return(NULL);
endcatch;
return(oIIsVDir);
end;


Do you happen to know why this works in all environments except Vista w/ SP1? Is there a workaround?

Thanks again for all your help!
Chris
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

It looks like you're using the ADSI interface for IIS. Unfortunately, we don't really have any knowledge about that interface. We use the native admin COM objects provided by IIS to make changes to the system. The only real problems we encountered on Server 2008/Vista SP1 was an access violation on one of the property interfaces and another issue with certain properties no longer being allowed at the web.config level.

Is there any specific reason you're using custom code to work with IIS instead of using the InstallShield IIS support (it should be possible to name virtual directories dynamically using MSI properties)?
0 Kudos
ChinniMP
Level 3

Hi all,

I am not able to create virtual directory in vista eventhough I had replaced IISHelper.dll.

Help me on this.

Thanks in advance.
0 Kudos
TheTraveler
Level 8

I created a series of IIS functions written in Install Shield (IS) script that uses ADSI COM objects.

Here is a link.

If anything, these functions will allow you to better trouble shoot your problem and it shouldn't hang on you as long as the functions in question are surrounded by Try Catch statements.

Here is a list of what these functions will allow you to do:
1) Create or Delete IIS Virtual Folders.
2) Create IIS Application pools
3) Check to make sure IIS is installed.
4) Obtain a list of available Web Sites already defined in IIS.
5) Disable Web Directories
6) Obtain the TCP/IP Port number of the web site.
7) Enable Parent Paths on any given web site.
😎 Configure the ASP Script Language used by the web site.
9) Set ASP Max Request Entity. In otherwords, set the maximum file size that is allowed to be uploaded to the web site.

As a side benefit, the thread contains functions that will allow you to configure FTP sites.

WARNING: I have not tried these functions on Windows 2008. If the ADSI interface hasn't changed and it is compatible with IIS 7.0, then it should work. I will say this though, I have used these functions for years and they haven't failed on me yet.
0 Kudos
philezo
Level 2

I'm also having trouble with installations of a web site and app pool under Windows Web Server 2008 and IIS7. I've tried the IISHotfix.zip, and have had limited success, but there are 2 serious drawbacks:
1. It requires the installation of IIS6 Management Compatibility Objects
2. It still does not create the Application Pool correctly - It creates a "Classic .NET AppPool" rather than the name the installer was given, and thus doesn't associate the virtual directories with the apppool that they are supposed to be in.
I've also tried a demo of Installshield 2009, which based on testing seems like it resolves the above issues.

My question is, are my only options to Upgrade to IS2009 -or- write my own code to install the application pool and virtual directories correctly?
0 Kudos
Somebody
Level 3

philezo wrote:
My question is, are my only options to Upgrade to IS2009 -or- write my own code to install the application pool and virtual directories correctly?


I am having problems with IIS 7.0 on Windows Server 2008 too. Is it a known fact that things work better with InstallShield 2009?

Thanks
0 Kudos
philezo
Level 2

Somebody wrote:
I am having problems with IIS 7.0 on Windows Server 2008 too. Is it a known fact that things work better with InstallShield 2009?

Thanks


Here's what I've found, and how I found it:

I created a very simple installer to create a website for hello.htm, specified that it create an appPool and a virtualDirectory. With the hotFix on page2 of this thread, IS2008 does work. So then I started comparing that simple installer to our more complex one, and looking through the windows installer logs for the 2 different installers.

What I found was that the component associated with the AppPool in our main install had a condition on it (IIS_VERSION>5) which was preventing the AppPool from being created in winServer2008. The hotfix appears to have removed the need for this component to be conditional.

The other thing we discovered in testing was that our installer was attempting to register the ASP.NET Web Service Extension Component (aspnet_isapi.dll) and failing. Interestingly if you have User Admin Control turned on in the Users Control panel, the install would ignore the failure, but if you had UAC turned off, or right clicked the setup and selected Run As Administrator, the setup would roll back.
Our solution to this problem was to make the webserviceextension component condition: IIS_VERSION>5 AND IIS_Version<7
0 Kudos
halikkat
Level 3

Hi,

I am not sure if this is the right way to do it, but I am editing applicationHost.config file in XML changes view. That way I am getting the results/configuration I want in IIS 7.0. Any comments?

But now I have a problem too. I am testing my installation in 64-bit environment and my setup is editing applicationHost.config. Problem is, that in 64-bit windows 2008 server my applicationHost.config xml change doesn't edit applicationHost.config under ...windows\system32\inetsrv\config. Xml change goes to sysWOW64 folder. Even if I try to use [System64Folder] property. Help me please?
😞
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

The 64-bit folder properties only resolve to 64-bit locations if your package template requires 64-bit systems. Thus you cannot do this without either creating multiple packages or removing support for 32-bit systems.
0 Kudos