Storing extended IIdentity in HttpContext.Current.User (IPrinciple)
<p>I have created an <code>ExtendedId</code> class which extends <code>GenericIdentity</code>.  (This stores Id as well as name)</p>

<p>In a httpmodule I stored this extended id in Current.User like so:</p>

<pre><code>HttpContext.Current.User = new GenericPrincipal(myExtendedId, roles);
</code></pre>

<p>Problem is, later, how do I get at my <code>ExtendedId</code> type again?</p>

<p>If I try this:</p>

<pre><code>ExtendedId eId = (ExtendedId)HttpContext.Current.User.Identity;
</code></pre>

<p>I get a casting error.  I have a feeling I'm doing something stupid here with casting, but I'm a bit foggy this morning.  </p>
