FAQ
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>

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-list/attachments/20040224/9495dc53/attachment.htm

Search Discussions

  • Robert Brewer at Feb 24, 2004 at 7:38 pm

    Gandalf wrote:
    I'm using IIS with python. I'm trying to use this combination
    for the first time. I have a problem here.
    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

    http://www.faqts.com/knowledge_base/view.phtml/aid/4937/fid/501

    HTH,

    FuManChu
  • Gandalf at Feb 24, 2004 at 8:35 pm

    I'm using IIS with python. I'm trying to use this combination
    for the first time. I have a problem here.
    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

    http://www.faqts.com/knowledge_base/view.phtml/aid/4937/fid/501
    You are my man! Thanks!

    G

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedFeb 24, '04 at 6:22p
activeFeb 24, '04 at 8:35p
posts3
users2
websitepython.org

2 users in discussion

Gandalf: 2 posts Robert Brewer: 1 post

People

Translate

site design / logo © 2023 Grokbase