I want to store some data like the user nickname and user ID (table primary key) in the user data section of the auth cookie. The reason I\'m doing this is to retain this da
Storing extra user data in the cookie means a larger cookie that is sent back and forth from the client with every request.
A better approach to avoid the extra database hits you are worried about is to cache that data in memory after the user logs in.
ASP.NET has a per request cache HttpContext.Current.Items and a app domain cache HttpContext.Current.Cache, I think you are looking for HttpContext.Current.Cache in this instance.
Alternatively if you need caching across web servers (load balanced web servers) you can look into 3rd party key value stores like like memcached, redis, velocity, ncache etc.