I have a classic ASP site where I create a dictionary when the user logs in and then stores that dictionary in a session variable like so...
dim objDict
set
Have you tried in your code doing something like the following when you want to access it?
Dim objDict
Set objDict = session("user")
Response.Write objDict("id")
Try that and see if it works. I wouldn't think this would be necessary but Classic ASP wasn't exactly the most robust language. What you want to do should be workable, since the Session object simply stores objects.
The error you are getting is a remote procedure call error. I can't explain why you get this error or why extracting into a local variable fixes it.
However I can tell that its really bad idea. When you store an object such as this in the Session object you create an affiliation between the current thread executing the script and the session. As result all subsequent requests for that session must now be handle only by this specific thread. If that thread happens to be busy handling someone elses request the sessions request is queued even if there are plenty of available work threads that could be used. Hence storing an object in the Session can significantly damage the scalability of the app.
I'd also question the wisdom of storing a Dictionary in something which is already a dictionary?
Why not just user :-
Dim userID : userID = Session("user_id")
Where anything you would normally have stored in the "user" dictionary, such as "id", would simply have the prefix "user_" and stored direcly in the Session?