I am implementing a custom MembershipProvider in order to pass the login details to a custom business object that we use in several other places in our company. But once we have authenticated I'd like to save this initialized business object in the session to be used later in other pages. Let me give an example.
public override bool ValidateUser(string username,string password)
{
try
{
// I want to keep this "object" in the Session to be used later on
CustomBusinessObject object = new CustomBusinessObject(username, password);
return true;
}
catch (CustomBusinessAuthenticationException)
{
return false;
}
}
Is there a way for me to do this? I didn't immediately see a way to get access to the Session object through implementing this custom MembershipProvider.