There are tons (really) ways of doing this
Storing session state is a basic requirement for many web-farms/apps. You can use LINQ->SQL to store it in a database or you could use flat-files on a SAN. It really doesn't matter (other than form a performance point of view) providing you have some method to serialize from storage format to native language format.
In PHP the Session handler maps to a session table as strings. In Python you might marshall an object to a string and store that.
I would recommend an SQL backend accessed in any form, because RDBMS are designed for concurrent access so you don't need to worry about locking and so on. And it scales as well as the RDBMS
You could use something like SQL Alchemy
Session = sqlalchemy.orm.sessionmaker() session = Session()
From
http://www.darrellhawley.com/2009/01/sql-alchemy-orm-basics.html
Or here
http://idunno.org/articles/277.aspx
Or this HOWTO from Microsoft called "HOW TO: Configure SQL Server to Store ASP.NET Session State" might help
http://support.microsoft.com/kb/317604
Which provides
<sessionState
mode="SQLServer"
sqlConnectionString="data source=127.0.0.1;user id=<username>;password=<strongpassword>"
cookieless="false"
timeout="20"
/>
Without looking at your apps needs, then determining if sessions state is required is impossible. But at the end of the day, state is state, and the requirements of access to that state (read-heavy, write heavy, big, small, whatever) determine how you store that and in what format.
I would recommend either an ORM mapping between a hashmap-like object to an SQL table or serialization of a hashmap such that
session = load_from_sql(session_id)
someval = session['var']
Keeping values as strings or native objects depends on the ORM you select, how easy it is from your language and so on. Performance is also a factor, as well as database footprint. You may find it simpler to store strings of simple variables and unmarshall-on-demand. You could store JSON types and then convert them to native.
Alot to consider...
SQL is probably simplest, be it ORM->session_object or a bunch of tuples mapped to a hashtable.
Good Luck