davidesharpe
Posts: 56
Joined: Fri Jul 01, 2011 4:56 am

Changing IIS Authentication, depending on a property

Hi,

We have a project that installs a .net web application in IIS, we have an option in the installer to choose to use Active Directory security or not.

My issue is that we'd like change the 'allow anonymous web access' of the application, depenant on if the user chose active directory or not.

Also we'd liike to change some of the custom errors, but again ONLY if they chose Active Directory

How can I achieve this ?

Also is there a way to change the authentication on a single file in the web application ?

Thanks
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Changing IIS Authentication, depending on a property

Hi,
How can I achieve this ?
Unfortunately there is no way to condition that setting. You can however try the following approach to condition settings for a web application:
  • create a public property in the Install Parameters page that resolves to the web application's installation name
  • add a new web application in the IIS page with the same formatted reference to the public property
  • modify each according to the different scenarios you need
  • condition each of them accordingly( Active Directory setting in your current case )
This way only one web application will be conditionally installed.
Also is there a way to change the authentication on a single file in the web application ?
You can try using file permissions in the Files and Folders page to accomplish this.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
davidesharpe
Posts: 56
Joined: Fri Jul 01, 2011 4:56 am

Re: Changing IIS Authentication, depending on a property

If I understand you correctly you are saying.

1. Create two (almost identical) websites in the IIS page. One with active directory settings one without.
2. Have a property that is indicates Active Directory or not. (We already have a WT_MEMBERSHIP property that is set to 'StandardLogin' or 'ActiveDirectoryLogin')
3. In the Install Condition of the two websites, one will have WT_MEMBERSHIP='StandardLogin' and the Other will have "WT_MEMBERSHIP='ActiveDirectoryLogin'

and therefore only one or the other of these two sites will be created.

???
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Changing IIS Authentication, depending on a property

Yes, this is what I meant by suggesting the settings above.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
davidesharpe
Posts: 56
Joined: Fri Jul 01, 2011 4:56 am

Re: Changing IIS Authentication, depending on a property

Thanks, that worked

Return to “Common Problems”