vpekulas
Posts: 9
Joined: Fri Jan 04, 2008 7:25 pm

IIS 2 folder question

Hello, while I can set the Virtual Dir in the IIS page and it gets created perfectly well, it creates 2 folders for me in the IIS console.

1. I set the Application Folder to : [WindowsVolume]Inetpub\wwwroot\AppTest\
2. I create a new AppTest Virtual Dir under the default website.

I thought this would set the existing AppTest folder (that gets created during the install) as a Virtual Dir and set it as a web application.

Is there another way to install a web application ? Thanks in advance.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
1. I set the Application Folder to : [WindowsVolume]Inetpub\wwwroot\AppTest\
Please note that you shouldn't use the folder wwwroot for your web application and you should create a new Web Site in the "IIS" page.

After you create a new Web Site, you can configure it the way you need. Also, you can set the root physical folder for the new web site by using the "..." button in the "Folder" field of the "Web Site" tab:
http://www.advancedinstaller.com/user-g ... tings.html

Please note that all of the sub-folders on the disk of the Web Site folder will be added automatically to the Web Site.
2. I create a new AppTest Virtual Dir under the default website.
A Virtual Directory is a folder which on the disk is not a sub-folder of the Web Site folder, but you need it to be shown under the Web Site.

For example, if the Web Site is set to the "[WindowsVolume]Inetpub\" folder then all the sub-folders of "[WindowsVolume]Inetpub\" will be shown under the Website. Also, if you need to add an external folder to your Web Site (for example "[WindowsVolume]Test") then you create a virtual directory for it.

You can read more about IIS here:
http://www.advancedinstaller.com/user-g ... l-iis.html
http://www.advancedinstaller.com/user-guide/iis.html

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vpekulas
Posts: 9
Joined: Fri Jan 04, 2008 7:25 pm

Thanks, though I'm either not understanding this correctly or it won't just simply work. Let's assume the user has already some apps setup on the default web site, when I go and create a new new website the old website gets stopped and the new one started, which in turns disables his already installed apps.

So the solution would be to go with the default web site and set one of the sub-folders of wwwroot as a web application. But then the AI creates 1 folder with the contents of the name I specify and a 2nd one in the IIS default websites that controls the Virtual Dir(VD). Don't get me wrong it works fine this way, I just don't like to have the 2 folders in the IIS of the same name only so one can set the VD and the other host the files. Usually you'd create only one folder, copy the app files there, and set it as a Web App in the IIS.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

In order to accomplish what you need you must create a new Virtual Directory under the Default Website. Please make sure that for this Virtual Directory the "Virtual Directory is a web application" option is checked.
So the solution would be to go with the default web site and set one of the sub-folders of wwwroot as a web application.
Please note that you must not use wwwroot for your virtual directory (you can choose any folder you want using the folder picker).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vpekulas
Posts: 9
Joined: Fri Jan 04, 2008 7:25 pm

Sorry to keep bugging you on this issue, but what would be the technical reason for no creating the application folder under the wwwroot folder ?
In my long experience this is exactly where 99% of my users install their web application. I'm just wandering if there is a work around for this or if simply the AI can't do that.

When I did some testing where the APPDIR was in wwwroot and the VD was set the same as that new folder name in the APPDIR, the folder did get set as VD etc, though the permissions where applied wrong, if I go to IIS and remove and then create the web application in the IIS console it works perfectly well.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
but what would be the technical reason for no creating the application folder under the wwwroot folder ?
If you create a web application under "wwwroot" and use a virtual directory, you will encounter the problem you mentioned in the first post. Also, if you use "wwwroot" in Advanced Installer and it is not present on the target machine, the web application will not work.

Since a web application must have a virtual directory and using both "wwwroot" and a virtual directory creates duplicate folders, the solution is to not use "wwwroot".

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vpekulas
Posts: 9
Joined: Fri Jan 04, 2008 7:25 pm

So in the end this really is a limitation of the AI rather then a wrong way to go about it. Why I'm trying to push this into the wwwroot folder is simply because of some already established standards as well as some components on the server are often limited only to the wwwroot folder. So in the end I'm trying to go int he path of least resistance from the user side.

Is there a function either AI or vbs that I can trigger to set the given folder as a web app after the install has been completed so I'd not use the IIS section of AI directly. Thanks.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,
Is there a function either AI or vbs that I can trigger to set the given folder as a web app after the install has been completed so I'd not use the IIS section of AI directly.
I'm afraid that there is no such function in Advanced Installer because it is recommended to use the "IIS" page (the Advanced Installer IIS feature has been optimized to correctly install a web application).

However, this can be done by using a custom action, but I'm not sure how this custom action will look like.
http://www.advancedinstaller.com/user-g ... -page.html

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vpekulas
Posts: 9
Joined: Fri Jan 04, 2008 7:25 pm

Thanks for your time and great support.

Return to “Common Problems”