I have a user database, to which I have access trough a web service. One of the web service method is something like this:
public void login(string name, string password, out user_key)
and in my controller I want to do something like this:
String key = repo.login(username, password); // a wraper on the login method
if(key ....)
FormsAuthentication.SetAuthCookie(username, false);
And my questions, here they come: This key is used for retrieving specific user data. Where do I put the key, so that I can have access to it? I mean is there a method for the FormsAuthentication class, because saying something like: Session["key"] = key doesn't look like a good practice to me. And what is the good practice here? so that bad-guys won't hack my session.