views:

207

answers:

1

I'm looking for a good way to visualize ASP.NET session state data stored in SQL server, preferably without creating a throwaway .aspx page. Is there a good way to get a list of the keys (and serialized data, if possible) directly from SQL server?

Ideally, I'd like to run some T-SQL commands directly against the database to get a list of session keys that have been stored for a given session ID. It would be nice to see the serialized data for each key as well.

A: 

Can you elaborate slightly, is there no reference to a HttpContext available (You can use this from backend code as well FYI), which prevents you from utilizing the built in serialization and keys dictionary?

EDIT, in response to your update. I believe the ASPState database creates and destroys temporary tables as needed, it does not have permanent tables you can query, take a look at the stored procedures and you should find one along the lines of "TempGetItem", you can either use this sproc directly, or examine its source for more insight.

FlySwat
I updated my question to clarify. I don't want to write throwaway ASP.NET code, I was hoping I could query the session database directly using T-SQL... but the ASPState database (which I assume is the backing store) doesn't have any tables in it.
Seth Petry-Johnson