Click here to Skip to main content
16,017,881 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All

how could i store user data as object inside Ticket UserData

i have a class which is SSUser , this class authenticate and load all permissions of current user in the login page
as this
SSUser myUser=Authenticate("username","password");

Authenticate method return an object of SSUser when the username and password is correct
now what i am doing is saving this "myUser" in the Session state like this
Session.Add("User",myUser);

there is no problem with that , but i have read that storing object inside Session state lead to low performance when the application is used by more that 10 users at the same time.
my question
is could i store this "myUser" object inside the Ticket.UserData ??
is there any solution for that ?

thank you very much
Posted

1 solution

I have no idea what Ticket.UserData is, but if it's stored on the server, then it's going to use the session, if it's a per user object. It's unavoidable to save SOMETHING in the session to manage login data. If the object is lightweight, it's probably OK. If it's not, then consider storing an id and using that to populate your other data as needed from the DB.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900