title: What makes the FederatedAuthentication.SessionAuthenticationModule return NULL?
body: <p>I'm not sure why but my FederatedAuthentication.SessionAuthenticationModule is resolving as NULL and crashing my app when I try to run my ClaimsTransformer() module:</p>
  
  <pre><code>    public void EstablishSession(ClaimsPrincipal principal)
      {
          var sessionToken = new SessionSecurityToken(principal, TimeSpan.FromHours(8))
          {
              IsPersistent = false, // make persistent
              IsReferenceMode = true // cache on server
          };
  
  
          FederatedAuthentication.SessionAuthenticationModule.WriteSessionTokenToCookie(sessionToken);
         // FederatedAuthentication.SessionAuthenticationModule == null and I throw an error :(
      }
  </code></pre>
  
  <p>Here's what's in my web.config:</p>
  
  <pre><code>&lt;configSections&gt;
    &lt;section name="system.identityModel" type="System.IdentityModel.Configuration.SystemIdentityModelSection, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /&gt;
    &lt;section name="system.identityModel.services" type="System.IdentityModel.Services.Configuration.SystemIdentityModelServicesSection, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /&gt;
  &lt;/configSections&gt;
  &lt;system.web&gt;
    &lt;authentication mode="None" /&gt;
  &lt;/system.web&gt;
  &lt;system.webServer&gt;
    &lt;modules runAllManagedModulesForAllRequests="true"&gt;
      &lt;remove name="RoleManager" /&gt;
      &lt;remove name="FormsAuthentication" /&gt;
      &lt;remove name="SessionAuthenticationModule" /&gt;
      &lt;add name="SessionAuthenticationModule" type="System.IdentityModel.Services.SessionAuthenticationModule, System.IdentityModel.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /&gt;
    &lt;/modules&gt;
  &lt;/system.webServer&gt;
  &lt;system.identityModel&gt;
    &lt;identityConfiguration&gt;
      &lt;claimsAuthenticationManager type="Web.Infrastructure.Authentication.ClaimsTransformer, Web" /&gt;
    &lt;/identityConfiguration&gt;
  &lt;/system.identityModel&gt;
  &lt;system.identityModel.services&gt;
    &lt;federationConfiguration&gt;
      &lt;cookieHandler requireSsl="false" /&gt;
    &lt;/federationConfiguration&gt;
  &lt;/system.identityModel.services&gt;
  </code></pre>
  
  <p>This is driving me crazy as I have the code running in a (proof of concept) project without any problems, and appears is all I need to get this functionality working, but for some strange reason, when I try to implement in our real project, my FederatedAuthentication.SessionAuthenticationModule is always NULL.</p>
  
  <p>What am I missing here?  Any Ideas?  Why is the SessionAuthenticationModule not initializing correctly?</p>