Configuring Active Directory

Iron Speed Designer and your generated application should run on any computer which is in your Active Directory and has proper access to Active Directory.  Proper access means both that (a) you can log into your computer using the domain user name and also (b) Iron Speed Designer and your application can retrieve information from the Active Directory such as the root path, search the Active Directory and perform other standard operations.

Operating system dependencies

The network access permissions and the operating system of the machine running your application affect the Active Directory functionality available to your application.

<identity impersonate="true" userName="username" password="password" />

Microsoft IIS will use these credentials to access the Active Directory.  The downside of this approach is that automatic sign in option in Active Directory should be disabled because the application will use username and password values from the Web.config file to authenticate the user instead of the user’s actual credentials.  If the automatic sign in option is disabled, users will be able to sign in with their username and password and they can use the ‘remember me’ option on the Sign In page to remember them in the future.

Verifying your Active Directory connection

Check if other Active Directory utilities such as Administrative Tools, Active Directory Users and Computers; and Administrative Tools, Active Directory Sites and Services can start.  If they can’t find the domain or connect to the domain controller, most likely:

Contact your IT administrator to properly configure your Active Directory.

Configuring Microsoft IIS to work with Active Directory

Set IIS Authentication Methods to Integrated Windows Authentication.  This is located in Directory Security, Anonymous access and authentication control section of the Microsoft IIS Properties menu.

Configuring your Machine.config file

The processModel property in machine.config file should be either:

Note:  If you assign processModel to the built-in System account, most likely the Microsoft Authorization Manager (AzMan) API will not work.

The machine.config file is located in:

C:\<windows>\Microsoft.NET\Framework\<version>\config\machine.config

Ensuring optimum AzMan operation

If you are running application on non-Windows 2003 computer and the Microsoft IIS web server while using an AzMan policy store located in the Active Directory, make these changes to allow your generated application to access the AzMan policy store:

Step 1:  Add username account to the ‘Pre-Windows 2000 Compatible Access’ group in your Active Directory.

See http://support.microsoft.com/kb/331951 for details.

Step 2:  Set the <processModel …/> property of the <system.web> section in your machine.config file to allow the Microsoft IIS web server to run the ASP.NET application worker process (aspnet_wp.exe) using the account you added to the ‘Pre-Windows 2000 Compatible Access’ group instead of the built-in ASPNET account with lesser permissions.  The Authorization Store running on the Domain Controller machine and located in your Active Directory does not allow processes owned by the ASPNET account to access any information.

This property should have these attributes:

enable="true" userName="domain\username" password="validpassword"

See http://msdn2.microsoft.com/en-us/library/aa291339(VS.71).aspx  for details.

Note: the Microsoft IIS web server will assign all processes it starts to this account.

If you change your machine.config file, reboot your computer to make these changes effective.

If you do not change your machine.config file, you can still use AzMan role management, with an XML file-based policy store, but in a less efficient mode.  This mode only affects authorization of users different from the current user logged into Microsoft Windows.  Namely instead of using the GetRolesForUser(username) method to retrieve the list of roles for a particular username, your application will create a new HttpContext with username as a current user, retrieve its roles via the GetRolesForUser() method and then roll back to the previous context.

See Also

Active Directory and Microsoft Authorization Manager Configuration