Session object in ASP script

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gandalf

    Session object in ASP script


    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.Con tents.Count))
    Response.write( "\n")
    Response.write( str(Session.Con tents.Item("foo ")))
    Response.write( "\n")
    Response.write( str(Session.Ses sionID))

    ....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.Content s.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


Working...