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

Virtual Directory is created under Virtual Application

It seems that on IIS7, InstallShield will create a virtual directory under a virtual application while in IIS6 the same setup creates a single virtual directory which is also an application.

For example, if I create a virtual directory called "Directory" and set the application name to "Application":

When I run my install on Windows Server 2003 I can access my website using the url: http://localhost/Directory

When I run my install on Windows Vista I can access my website by using the url: http://localhost/Application or http://localhost/Application/Directory, (both get mapped to the same physical path by InstallShield) but neither of which is what I want (http://localhost/Directory). I can work around it by naming the application the same as my directory (Directory in this example) but then I still have an extra nested virtual directory (http://localhost/Directory/Directory).

Is there any way to work around this? Is this a known issue? It seems pretty clear to me that the desired behaviour would be to have InstallShield configure both IIS6 and IIS7 with the same virtual applicatoon/directory structure.
Labels (1)
0 Kudos
(13) Replies
klacounte
Level 6

I'm just starting some Vista testing. I'll let you know if I have the same issue.
0 Kudos
Colbey
Level 4

I’ve done a quick test and my install did the same sort of thing. Using the same install on XP with IIS 5.1 I get one virtual directory but using IIS7 on Vista I have 2 virtual directories one under the other.

Would also like to know if this is a known issue. The IIS support within IS seems rather buggy.
0 Kudos
Bruno_Walter
Level 4

OK, so I am not alone in observing this behaviour but InstallShield hasn't commented. I guess it's time to open a support incident.
0 Kudos
Colbey
Level 4

Did you open a support incident; what was the response?
0 Kudos
jchristman
Level 8

Have you validated the project for use with Vista?
0 Kudos
Colbey
Level 4

Yep, the validation didn’t contain anything unusual. I think its an IIS7 issue rather than something caused by Vista.
0 Kudos
Marachkovski
Level 4

Such problem really exists and i didn't find any normal workaround to resolve it.
In our installation we have .net installation class. In Install method i manually "convert" virtual folders to applications. To do this i use Appcmd.exe utility.
Our .net code looks like this:
if (Context.Parameters["OSVista"] == "1")
{
sc.AddRange(new string[] {
"delete vdir \"Default Web Site/" + WebAlias + "/" + WebAlias + "/Server\"",
"delete vdir \"Default Web Site/" + WebAlias + "/" + WebAlias + "/Client\"",
"delete vdir \"Default Web Site/" + WebAlias + "/" + WebAlias + "\"",
"add app /site.name:\"Default Web Site\" /path:/" +WebAlias+ "/Client /physicalPath:\"" + InstallPath + "\\FolderName\\Client\"",
"add app /site.name:\"Default Web Site\" /path:/" +WebAlias+ "/Server /physicalPath:\"" + InstallPath + "\\FolderName\\Server\""
}
);
}

foreach (string arg in sc)
{
string pathToAppCmd = Path.Combine(Environment.SystemDirectory, "inetsrv\\appcmd.exe");
string pathToLog = somePath + "\\Install\\SiteReconfiguredLog.txt";

Process proc = new Process();
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.Arguments = arg;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.RedirectStandardInput = true;
proc.StartInfo.CreateNoWindow = true;
proc.StartInfo.FileName = pathToAppCmd;
proc.Start();

using (StreamWriter log = new StreamWriter(pathToLog, true))
{
while (!proc.HasExited)
log.WriteLine(proc.StandardOutput.ReadToEnd());
}
}

I didn't find how to convert virtual directories to applications, so firstly i remove virtual directory and then create application with the same path and name.
0 Kudos
Colbey
Level 4

Thanks. I guess using our own CA’s may be the best way to avoid the bugs with the stuff produced by IS, but I prefer not to as in theory the IS stuff should receive more use and be well tested.

Has anyone raised a support request with IS for this? I would but I don’t have a support contract...
0 Kudos
JesseBearden
Level 5

Did anyone ever find a simple fix for this?

Jesse
0 Kudos
Bruno_Walter
Level 4

If the IIS backwards compatibility is installed, you can force InstallShield to use the IIS 6 and earlier runtime for configuration which avoids the nested Virtual Directory.

There's a KB article on how to do this: Q113487

Basically, you create a property called IISPREFERLEGACYOBJECTS and set it's value to "1".

I highly recommend using this option if possible as it seems to resolve some other problems I've seen with InstallShield and IIS7, including hangs on Vista SP1 and possibly Windows Server 2008 (need to retest, but the symptoms were identical to those on Vista SP1.)
0 Kudos
nitsev
Level 6

Colbey wrote:
Has anyone raised a support request with IS for this? I would but I don’t have a support contract...


I have submitted a support request about IIS 7 support in general (work order IOC-000065672, created in October 2007). I don't know how well your problems apply though. Generally IS does NOT support IIS 7 although they claim they do. IIS 7 is fundamentally different from previous versions of IIS, but this is not reflected in IS. Instead they have tried to squeeze the IIS 7 settings into the existing dialogs etc. so that they will support both IIS 7 and older version of IIS, but it does not work since IIS 7 is so different. Nice marketing but less nice for IS users who is actually trying to use this non-working functionality. I was recommended by IS support to use Appcmd.exe instead, which I can just as well call with an old version of IS.

An example:
In IIS 7 the ASP.NET version is set on the Application Pool, NOT on the site and NOT on the virtual directory. In IS you can create an app. pool but there is no way to specify the ASP.NET version it should run. In IS the ASP.NET version are set on the site and/or the virtual directories, which is fine if you install on IIS 6 and earlier but is not applicable if you install on IIS 7.

another example:
Create a new site and a virtual dir named vdir in IS. Also set the application name for the virtual dir to vdir. This works fine in Windows Server 2003, but on Vista IS will create an application with the name vdir that contain all subdirectories of the defined virtual directory PLUS a virtual directory named vdir that also contains the same subdirectories. Both the app and the virtual directory point to the same physical path. This has the effect that the address to the virtual directory will be http://servername:port/vdir/vdir and the address to the application will be http://servername:port/vdir.
0 Kudos
nitsev
Level 6

I just upgraded to IS 2010 and upgraded my project and it seems that this bug is still not resolved (duplicate directory issue). Anyone else with the same behaviour on IS 2010?
0 Kudos
nitsev
Level 6

It appears that this indeed does work in IS2010 but you need to manually change the type of the items in the ISISItem table. See the following post.
If you don't change these values the duplicate dir. issue will remain.

http://community.flexerasoftware.com/showthread.php?p=442937#post442937

Regards
Frede
0 Kudos