Session object in ASP script

G

Gandalf

Hi All!

I'm using IIS with python. I'm trying to use this combination for the
first time. I have a problem here.
I cannot use the Session object. I tried these:

Response.write(str(Session))
Response.write("\n")
Response.write(str(Session.Contents.Count))
Response.write("\n")
Response.write(str(Session.Contents.Item("foo")))
Response.write("\n")
Response.write(str(Session.SessionID))

....and I got these results:

<COMObject Session>
0
None
455980977


That is fine. But I cannot assign new items to the Session. For example:

Session.Contents.Item("foo") = 1 -> HTTP/1.1 500 Server Error
Session("foo") = 1 -> HTTP/1.1 500
Server Error
Session.foo = 1 -> AttributeError: foo

Most annoying: there is no traceback, no useful error message. Only this
500 (internal server error).
In VBScript I could simply do

Session("foo") = 1

In JScript I could do this either. How can I use the Session object with
ASP/Python? Can somebody help me?
Do I have to implement my own session handling? :-( I would not like to.
Thanks in advance.

G
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,247
Latest member
crypto tax software1

Latest Threads

Top