Page 1 of 1
multiple virtual sites under one web site
Posted: Mon Oct 04, 2010 2:28 pm
by BobSchaefer
I'm working on an installer that sets up three virtual folders on the default web site. Everything works exactly as expected if I install the websites to the default location, namely c:\inetpub\wwwroot. However, if I run the same installation and specify a location other than that (like a directory on the d:\ drive) things start to go wrong, basically, I get two out of the three virtual directories created. The files and directory tree are correctly copied to the new location, but for some reason, one of the sites fails to install. I've verified all three are using the same variable ($WWWROOTDIR$ in this case) for the physical path specified in the Create IIS Virtual Folder dialog box.
I've looked through the log file, but I can't find any error messages or any messages for that matter about the creation of these virtual directories. Is there any way I can get the tool to log what its doing and what's going on with the IIS interactions?
I've just double-checked the event viewer log and there's nothing in there to point to any issues as well.
Any thoughts, pointers, suggestions are greatly appreciated.
Re: multiple virtual sites under one web site
Posted: Mon Oct 04, 2010 9:27 pm
by mills
Have you tried debugging and stepping through? Create IIS Site is a "direct execute" control and its effects should apply immediately. This might give you a clearer indication of what's going on.
Re: multiple virtual sites under one web site
Posted: Tue Oct 05, 2010 11:27 am
by BobSchaefer
Well I just tried pointing my websites to a different directory on my development machine so I can try it, as it only has one drive. Unfortunately, it produced a different problem, but its not really one of our target platforms.
The problem I'm seeing is on a Server 2003 R2 VM and is not the box I do my builds on. That box is an XP box, and like I said it had other problems, but I'm not overly concerned about that as its not a valid (other than development) target.
I tried a couple of additional things and it doesn't appear to be specific to the drive, but rather to any directory other than \inetpub\wwwroot. If I point to IISRootDir on the c:\ drive, it will only create two of the three, if I point it to IISRootDir on the d:\ it does the same thing.
Based on your answer and suggestions, I'm gathering that there isn't a way to get it to log information or an error return to check.
If I can provide any further information, please let me know. (Oh, it is InstallAware Studio V9 R2)
Bob
Re: multiple virtual sites under one web site
Posted: Tue Oct 05, 2010 4:02 pm
by mills
Well, you can log the setup like:
setup.exe /l=C:\log.txt
It's possible that it could include some useful information.
Re: multiple virtual sites under one web site
Posted: Tue Oct 05, 2010 6:14 pm
by mills
You might want to post the InstallAware data for the second and 3rd calls to the command.
Is the site index set on the 3rd call? That's my best guess why it's not being created...
For instance, I ran some tests and it doesn't look like you actually need the physical folder to exist for the virtual folder to be created, but you do need to reference a site index.
I didn't check it, but after the 3rd call, you could display a messagebox with the value of LASTERROR, which may contain something.
Re: multiple virtual sites under one web site
Posted: Thu Oct 07, 2010 7:20 am
by BobSchaefer
Well, not quite sure what the real problem was, but I found that deleting the line in the MSI code and recreating it caused the problem to go away, now all three sites install just fine wherever I put them. Thanks for the help and suggestions.
FYI by the way, the LASTERROR variable was blank, and the create Virtual Directory piece doesn't put anything in the log file. The log file was the first place I looked, and found nothing in it about creating the directory at all.