IIS application using application pool identity loses primary token?

Through Microsoft Support I found out that we ran into the issue described in Microsoft Knowledge Base article KB2545850. This only occurs when ApplicationPoolIdentity is used. It occurs very easily, namely, after the machine account password is changed (which by default happens automatically every 30 days), and then IIS is restarted (e.g., through iisreset). Note … Read more

Configure ASP.NET MVC for authentication against AD

Forms Authentication You can use the normal forms authentication to authenticate a user against an Active Directory, for that you just need you AD connection string: <connectionStrings> <add name=”ADConn” connectionString=”LDAP://YourConnection” /> </connectionStrings> and add the Membership Provider to use this connection: <membership defaultProvider=”ADMembership”> <providers> <add name=”ADMembership” type=”System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicToken=b03f5f7f11d50a3a” connectionStringName=”ADConn” connectionUsername=”domain/user” connectionPassword=”pwd” /> … Read more

Querying Active Directory using VBScript

To look at all the members of an OU, try this… Set objOU = GetObject(“LDAP://OU=YourOU,DC=YourDomain,DC=com”) For each objMember in ObjOU ‘ get all the members’ ‘ do something’ Next To do a custom search for DNs try this… set conn = createobject(“ADODB.Connection”) Set iAdRootDSE = GetObject(“LDAP://RootDSE”) strDefaultNamingContext = iAdRootDSE.Get(“defaultNamingContext”) Conn.Provider = “ADsDSOObject” Conn.Open “ADs Provider” … Read more

Replacing a string with a variable in Get-ADGroup

This is one of the reasons why using a script block based filter (-Filter {…}) on the cmdlets of the ActiveDirectory Module is not recommended. The -Filter on the Parameter section of the Get-* cmdlets from ActiveDirectory Module states the following: -Filter Specifies a query string that retrieves Active Directory objects. This string uses the … Read more