Re: (CustomIdentity)Thread.CurrentPrincipal.Identity - Cast not Valid
From: Dominick Baier [DevelopMentor] (dbaier_at_pleasepleasenospamdevelop.com)
Date: 09/19/05
- Next message: Ollie Riches: "permissions & roles..."
- Previous message: Dominick Baier [DevelopMentor]: "Re: Forms Authentication works with Mozilla but not IE6"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 19 Sep 2005 10:13:23 -0700
Hello John,
you have to set the identity on every request. Gimme more info,
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
> I have created CustomPrincipal and CustomIdentity classes. Everything
> works great on my WinForms application, but as soon as i run my
> ASP.NET client I get a System.InvalidCastException: Specified cast is
> not valid error on the following line.
>
> CustomIdentity id = (CustomIdentity)Thread.CurrentPrincipal.Identity;
>
> The same exact code works in WinForms.
>
> Help !
>
> Thanks.
>
> John
>
- Next message: Ollie Riches: "permissions & roles..."
- Previous message: Dominick Baier [DevelopMentor]: "Re: Forms Authentication works with Mozilla but not IE6"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]