Andrey.Burda
Posts: 23
Joined: Tue Dec 14, 2021 12:06 pm

Dynamic IIS configuration

Thu Dec 23, 2021 12:48 pm

Hello!

I am looking into dynamic configuration for IIS while installation.
I have a list of Web Applications that is dynamically added to "Files and Folders->Application Folder" using Power Shell COM ($project.FilesComponent.AddFolderContents()), thus I cannot "hardcode" either App Pool or IIS Web Application.

As the installer for Web Applications, I am developing, will be aside of some "main" product, so "main" IIS Application Pool will be available on target machine as well as "main" Web Site.

The common requirement is to map installed Web Applications to existing App Pool, create the IIS Web App for each and map to the path it installed (set up virtual directory I believe). Also, in case if installed Web Application is .NET Core API, the separate App Pool should be created for it.

Basically, it would be great if some Power Shell interface to interoperate with IIS and Advanced Installer features exists, because I guess that UI functionality from IIS section is not my case.

Is there some build in features exist for this?

Regards,
Andrey

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Dynamic IIS configuration

Tue Dec 28, 2021 9:54 am

Hi Andrey,

I am not so sure I fully understand your request.

Do you need to use our PowerShell automation support to configure items (web sites, web apps, virtual directories and app pools) in our "IIS" page when building your setup project?

Or are you looking to configure in "IIS" page web site items whose install paths will be computed/selected on the fly at install time?

If you could give us a bit more details or exemplify a test case for your scenario this will be great.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Andrey.Burda
Posts: 23
Joined: Tue Dec 14, 2021 12:06 pm

Re: Dynamic IIS configuration

Fri Dec 31, 2021 9:46 am

Hi Daniel,

You are correct, general request is to have an ability to install dynamic list of services and configure appropriate Web Apps & App Pools for them.

I want to build a generic *.aip file that can be used for a multiple Web services installation, by passing some list of services to install to AI.

I was looking at either Power Shell COM functionality or Advanced Installer UI to achieve what I need.

Seems that AI UI for creating Web Apps expects user to select a path to a folder:
31-12-2021 12-15-18 PM.jpg
31-12-2021 12-15-18 PM.jpg (68.44KiB)Viewed 31121 times
The "Main" Web Site already exists under IIS as well as "main" App Pool. I see there is a feature that may skip the installation of Web Site if it already exists (check by name).

Regards,
Andrey

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Dynamic IIS configuration

Tue Jan 04, 2022 4:01 pm

Hi Andrey,

Thank you for your follow up on this.

Yes, in case the web site already exists you should use our "Skip item installation" error policy.

Also, I have added on our TODO list an improvement to extend our PowerShell automation support to cover IIS option in the setup project. When available we will update this forum thread. Thank you for your suggestion.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”