Cast exception w FormsAuthentication
From: news.microsoft.com (phewwee_at_yahoo.com)
Date: 10/16/03
- Next message: Steve Jansen: "Re: shared folder access"
- Previous message: Toby Considine: "Re: Form Authentication in ASP.NET for multiple users"
- Next in thread: Chris Jackson: "Re: Cast exception w FormsAuthentication"
- Reply: Chris Jackson: "Re: Cast exception w FormsAuthentication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 16 Oct 2003 14:51:22 -0700
I have a small ASPX app I have created and decided to roll my own Forms
Authentication. Now I take the user name, password and domain and created an
encrypted foms authentication ticket. In the ticket I put some info in the
userdata property. On a different page after authetication I want to accsess
that field. I found a couple of examples, one is like
lblLogin.Text = ((FormsIdentity)User.Identity).Ticket.UserData;
This throws an exception saying cast is not valid. I've looked at this where
the GenericPrincipal is created in the Globalasax file and I can see the
string data in the UserData, does anyone have any idea?
- Next message: Steve Jansen: "Re: shared folder access"
- Previous message: Toby Considine: "Re: Form Authentication in ASP.NET for multiple users"
- Next in thread: Chris Jackson: "Re: Cast exception w FormsAuthentication"
- Reply: Chris Jackson: "Re: Cast exception w FormsAuthentication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|