Ask a Question related to ASP.NET Security, Design and Development.
-
shaddock@-NOSPAM-gmail.com #1
FormsAuthenticationTicket does not return userdata
Hello,
I am trying to get FormAuthentication working, but the FormsAuthenticationTicket does not return the UserData. Does any one have any insight into this?
To create a Authorization ticket, I am using this code:
//grab the roles for this user. Pipe delimited string.
string roles = RetrieveRoles(custID);
//roles now equals something like "Manager|User"
//create an auth ticket.
FormsAuthenticationTicket authTicket =
new FormsAuthenticationTicket(
1,
custID,
DateTime.Now,
DateTime.Now.AddMinutes(10),
false,
roles
);
To get the roles I am using this code:
string[] roles = authTicket.UserData.Split(new char[]{'|'});
Thanks
Stewart
---
Posted using Wimdows.net NntpNews Component -
Post Made from [url]http://www.DotNetJunkies.com/newsgroups[/url] Our newsgroup engine supports Post Alerts, Ratings, and Searching.
shaddock@-NOSPAM-gmail.com Guest
-
FormsAuthenticationTicket UserData bug in framework 1.1, how to report it?
Seems pretty incredible a simple "how to report a bug" isn't available at all on Microsoft.com !! How the hell can we report a bug when we find one?... -
FormsAuthenticationTicket
I've followed the suggestions in MSDN > MSDN Library > .NET Developpment > .NET Securuty > Bulding Secura ASP.BET application article but the cookie... -
UserData size limit in a FormsAuthenticationTicket
Is there a size limit to the userData in a FormsAuthenticationTicket ? I'm asking this because when I try to encrypt the FormsAuthenticationTicket... -
FormsAuthenticationTicket timeout
Hi, What is the difference between the timeout parameter in FormsAuthenticationTicket constructor and timeout attribute in the authentication... -
How do you add userdata in maya?
Does anyone know how to add userdata in Maya, I can't seem to find it in the documentation or on google? Thanks Tim -
Joseph E Shook [MVP - ADSI] #2
Re: FormsAuthenticationTicket does not return userdata
Recently I ran into the same behavior.
I decided to use FormsAuthentication.RedirectFromLoginPage(userName ,
False) instead of
Response.Redirect(FormsAuthentication.GetRedirectU rl(userName, False)).
RedirectFromLoginPage issues an authentication ticket which then blows
away your ticket. Granted this is a comment I wrote in my blog a while
back but have a suspicion this may help you.
Joseph E Shook [MVP - ADSI] Guest



Reply With Quote

