PC Review


Reply
Thread Tools Rate Thread

Custom IIdentity object casting

 
 
Random
Guest
Posts: n/a
 
      25th Jan 2008
I've seen this topic around a bit, but no solution offered to the problem.
I have a custom class that implements IIdentity with additional properties,
some of which are essential to the authorization process. On login, I can
create and set the user based on the login, but when a subsequent page
request is made, the User.Identity is back to the standard. Now, logic
dictates that I could simply cast that instance of Identity back into my
custom class, but it doesn't work.

To me, this seems buggy. I would think that when asp.net reloads the
Principal and the Identity, that they would do so with the same class type
that they were first created under, based on them having the interface, but
that doesn't work. Even if the <authentication> node in web.config had
"principalType" and "identityType" attributes....

Can this be set somewhere? Or handled in a different way that doesn't rely
on going outside this process?


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
issue type casting derived object to base object Microsoft C# .NET 2 7th Sep 2007 07:26 AM
Custom IIdentity w/ FormsAuthentication Spam Catcher Microsoft ASP .NET 2 7th Jan 2006 04:17 AM
IIdentity casting problem Craig Buchanan Microsoft VB .NET 8 25th Feb 2004 04:55 AM
IIdentity casting problem Craig Buchanan Microsoft ASP .NET 6 25th Feb 2004 04:55 AM
Custom IIdentity class - how to set it? Tim Mulholland Microsoft ASP .NET 6 24th Feb 2004 07:34 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:24 PM.