Session object doesn't store value
<p>I'm currently creating a webpage, and I want to transfer one object that is related to the current visitor of the site, to another page. I chose to do this with the Session item. But there seems to be a problem, I declare it's value on one page like this:</p>

<pre><code>Session["CurrentAccount"] = new Account(tb_username.text, tb_password.text);
</code></pre>

<p>And want to retreive this data on another page like this:</p>

<pre><code>Account currAccount = (Account)Session["CurrentAccount"];
</code></pre>

<p>Whenever I try to do this, a nullreferenceexception occurs. 
The Account class isn't marked as serializable. And both pages are running under the same application.</p>

<p>Edit: I've tried to do the same thing but instead binding a regular string to a session, this didn't work either.</p>
