Yes, as for reassigning, it's the same with inproc session.
Thanks,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Eliyahu Goldin" <re*************@monarchmed.com>
| References: <em*************@TK2MSFTNGP09.phx.gbl>
<u9**************@tk2msftngp13.phx.gbl>
<uL*************@TK2MSFTNGP15.phx.gbl>
<uH**************@TK2MSFTNGP14.phx.gbl>
<mn***********************@spamgourmet.com>
<qM**************@TK2MSFTNGXA02.phx.gbl>
<u7**************@tk2msftngp13.phx.gbl>
<gi**************@TK2MSFTNGXA02.phx.gbl>
| Subject: Re: Using the Session object
| Date: Tue, 24 Jan 2006 12:31:22 +0200
| Lines: 177
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| X-RFC2646: Format=Flowed; Original
| Message-ID: <eo*************@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 212.143.94.3
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP11.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:373082
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| As you said, the requirement of being serializable is another story, I
know
| about it. I am asking on reassigning. Do outproc session managers work as
| Bruce describes in another post to this thread, that session variables
get
| serialized out at the end of request, and, therefore, you don't need to
| reassign?
|
| Eliyahu
|
| "Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
| news:gi**************@TK2MSFTNGXA02.phx.gbl...
| > Of course not, Inproc session is the default and simplest scenario. For
| > out-proc session, first , class objects(not primitive types) which need
to
| > be stored in session must be serializable, otherwise they can not be
| > stored
| > in session. So that's another story an d I just use inproc session for
| > instance...
| >
| > Regards,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure!
www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| > --------------------
| > | From: "Eliyahu Goldin" <re*************@monarchmed.com>
| > | References: <em*************@TK2MSFTNGP09.phx.gbl>
| > <u9**************@tk2msftngp13.phx.gbl>
| > <uL*************@TK2MSFTNGP15.phx.gbl>
| > <uH**************@TK2MSFTNGP14.phx.gbl>
| > <mn***********************@spamgourmet.com>
| > <qM**************@TK2MSFTNGXA02.phx.gbl>
| > | Subject: Re: Using the Session object
| > | Date: Tue, 24 Jan 2006 09:55:17 +0200
| > | Lines: 108
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| > | X-RFC2646: Format=Flowed; Original
| > | Message-ID: <u7**************@tk2msftngp13.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: 212.143.94.3
| > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msft ngp13.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:373054
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | Steven,
| > |
| > | Do you mean that with outproc sessions you have to reassign always?
If
| > it
| > is
| > | true, isn't then reassigning is a good practice since you can switch
| > between
| > | different session managements without code changes?
| > |
| > | Eliyahu
| > |
| > |
| > | "Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
| > | news:qM****************@TK2MSFTNGXA02.phx.gbl...
| > | > Assume that we're using Inproc session, then all the variables held
in
| > | > session state are in-memory objects. So whether we can directly
modify
| > the
| > | > object without reassign it back to the sessionstate entry depend on
| > its
| > | > class type. If it's of reference type, the session state entry just
| > hold
| > | > the reference to that object, so we can certainly just update it
| > without
| > | > explicitly reassign. If a value type, reassign is necessary....
| > | >
| > | > Regards,
| > | >
| > | > Steven Cheng
| > | > Microsoft Online Support
| > | >
| > | > Get Secure!
www.microsoft.com/security
| > | > (This posting is provided "AS IS", with no warranties, and confers
no
| > | > rights.)
| > | >
| > | >
| > | > --------------------
| > | > | Subject: Re: =?UTF-8?B?VXNpbmcgdGhlIFNlc3Npb24gb2JqZWN0?=
| > | > | From: "Hans Kesting" <ne***********@spamgourmet.com>
| > | > | References: <em*************@TK2MSFTNGP09.phx.gbl>
| > | > <u9**************@tk2msftngp13.phx.gbl>
| > | > <uL*************@TK2MSFTNGP15.phx.gbl>
| > | > <uH**************@TK2MSFTNGP14.phx.gbl>
| > | > | Message-ID: <mn***********************@spamgourmet.com>
| > | > | X-Newsreader: MesNews/1.04.01.00-gb
| > | > | Date: Mon, 23 Jan 2006 18:03:03 +0100
| > | > | MIME-Version: 1.0
| > | > | Content-Type: text/plain; charset="utf-8"; format=flowed
| > | > | Content-Transfer-Encoding: 8bit
| > | > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | > | NNTP-Posting-Host: 127-24.bbned.dsl.internl.net 82.215.24.127
| > | > | Lines: 1
| > | > | Path:
| > TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP15.phx.gbl
| > | > | Xref: TK2MSFTNGXA02.phx.gbl
| > | > microsoft.public.dotnet.framework.aspnet:372924
| > | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > | > |
| > | > | > That's what I said, and I just tried it out to make sure I
wasn't
| > | > bonkers.
| > | > | >
| > | > | > I'm not familiar with BOCSTransaction so anything's possible,
but
| > I
| > | > think
| > | > | > Peter and I are right on this one.
| > | > | >
| > | > | > Karl
| > | > |
| > | > | If "BOCSTransaction" is an object, then this is true (just the
| > | > | reference is stored in Session, so you are updating the "real"
| > object).
| > | > | However (just to be complete), if "BOCSTransaction" is a struct
| > | > | (ValueType, sorry, don't know the VB name) then you will get a
| > *copy*
| > | > | of the stored struct. So then you *will* have to "store back" the
| > | > | changed struct.
| > | > |
| > | > | Hans Kesting
| > | > |
| > | > |
| > | > | >
| > | > | > "Peter Rilling" <pe***@nospam.rilling.net> wrote in message
| > | > | > news:uL*************@TK2MSFTNGP15.phx.gbl... Doesn't the
concept
| > of
| > | > | > "references" form an automatic link. If he modifies the
variable
| > | > "trx", then
| > | > | > that would also be reflected back in the session version, right?
| > | > Unless the
| > | > | > value stored in the session is a value type.
| > | > | >
| > | > | > "Eliyahu Goldin" <re*************@monarchmed.com> wrote in
| > message
| > | > | > news:u9**************@tk2msftngp13.phx.gbl... Jerry,
| > | > | >
| > | > | > You are right, you have to update session variables, there
is
| > no
| > | > | > automatic link.
| > | > | >
| > | > | > Eliyahu
| > | > | >
| > | > | > <rl*****@newsgroups.nospam> wrote in message
| > | > | > news:em*************@TK2MSFTNGP09.phx.gbl... Simple
| > question,
| > I
| > | > | > think...
| > | > | >
| > | > | > I'm storing an object in the Session object.
| > | > | >
| > | > | > In the code behind I read that object: trx =
| > | > | > CType(Session("Transaction"), BOCSTransaction)
| > | > | >
| > | > | > If I change any properties, I have to store it back into
the
| > | > session
| > | > | > object to "update" it, right? Or will the changes to my object
| > | > automatically
| > | > | > be saved back into the session object?
| > | > | >
| > | > | > Thanks,
| > | > | > Jerry
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|