How to allow users to set identity/authentication for application pools and websites during installation?
This How-to article will present the required steps to allow your users to set website authentication method and application pool identity during the installation wizard UI.
If you do not intend to allow users to set identity/authentication during the installation wizard, please use the predefined website authentication and application pool identity views.
The following article uses options that are available starting with the Enterprise edition and project type.
1. Set website authentication method
To set the authentication method for the website during installation, a custom dialog needs to be created. The selected option from the dialog will be passed to the custom properties view of the website settings.
1.1 Create user selection dialog
Go to the Dialogs page to create a dialog that allows the user to select the authentication method.
Use the Add Dialog option to add a new dialog that will give the user the possibility to choose from:
- Windows authentication
- Anonymous authentication
When using anonymous authentication, a username and password will also be required.
Use the below image for your reference:
.
Use control conditions so that the username and password fields be enabled or disabled based on the user selection, as below:
On the Next control, some events need to be executed. These events will set accordingly properties that will further be used in the custom properties view:
1.2 Define website custom properties
In the custom properties view of the website, you need to create custom properties that will set the authentication to the selected option by the user during installation.
Use the New -> Attribute Value option to define the custom properties.
2. Set application pool identity
To allow the user to select the identity mode for the application pool, a custom dialog needs to be created. The selected option from the dialog will be passed to the custom properties view of the application pool settings.
2.1 Create user selection dialog
Go to the Dialogs page to create another dialog that allows the user to select the identity mode for the application pool.
Use the Add Dialog option to add a new dialog that will give the user the possibility to choose from:
- Local System
- Specific User
When using specific user option, the identity of the application pool will be set to the provided username and password.
Use the below image as a reference to create the custom dialog:
.
Use control conditions so that the username and password fields are enabled or disabled based on the user selection, as below:
2.2 Define application pool custom properties
In the custom properties tab from the application pool settings, you need to create custom properties that will set the application pool identity to the selected option by the user during installation.
Use the New -> Attribute Value option to define the custom properties.