title: Injecting ISecureDataFormat in Web API 2 AccountController using Autofac
body: <p>I am using ASP.NET Identity 2.2 in a Web API 2 project but I am unsure how to wire up the <code>ISecureDataFormat&lt;AuthenticationTicket&gt;</code> dependency of the <code>AccountController</code> using <em>Autofac</em>. </p>
  
  <p>I tried this: </p>
  
  <pre><code>builder.RegisterType&lt;ISecureDataFormat&lt;AuthenticationTicket&gt;&gt;()
         .As&lt;TicketDataFo‌​rmat&gt;(); 
  </code></pre>
  
  <p>and getting error: </p>
  
  <blockquote>
    <p>The type 'Microsoft.Owin.Security.ISecureDataFormat`1[Microsoft.Owin.Security.Authenticat‌​ionTicket]' is not assignable to service 'Microsoft.Owin.Security.DataHandler.TicketDataFormat'</p>
  </blockquote>
  
  <p>None of the questions I came across seem to work using the latest stable release of ASP.NET Identity. </p>
  
  <p>Any help is greatly appreciated.</p>