Session variable expirement.
Session variable expirement.
am 19.10.2005 10:46:12 von bluewind44
Hello, all.
Is there any case that session vaiables expire before the time-out?
Now, I'm developing the UI project that use the webservice project.
Ocationally I met the situation that I mentioned before.
Thanks.
Re: Session variable expirement.
am 19.10.2005 11:19:23 von Hans Kesting
bluewind44 wrote:
> Hello, all.
>
> Is there any case that session vaiables expire before the time-out?
>
> Now, I'm developing the UI project that use the webservice project.
> Ocationally I met the situation that I mentioned before.
>
> Thanks.
Session variables don't expire before the end of the session.
They can be *removed* before the end, or you have a different
session than you think.
You mention WebService. Webservices by default do *not* use
Session (for speed). So it you try to store something in Session in one
call and then use that in a next call, the value is gone (or even more
drastic: "Session" is null, so you get an error when you try to store anything)
To enable sessions for webservices:
1) use [WebMethod(EnableSession=true)] on the webservice method
2) create a CookieContainer (that's the name, I think) and add it to
the webservice proxy at the calling side (there is a property with a similar name).
Then use the same proxy or at least the same container for both calls.
Hans Kesting
Re: Session variable expirement.
am 19.10.2005 11:28:16 von bluewind44
Thanks for the reply.
Actually I don't use session varaiable on the webservice project.
I just use in a UI Projects and save it as a string variable.
Then I call my webservie project by using the string variable.
You mentioned about removement of session variable.
What cause removing the session variable ?
-----------------------
Kevin Lee
Re: Session variable expirement.
am 19.10.2005 12:22:48 von smaltaf
If, for some reason, the ASP.NET worker process crashes and gets recycles,
or the IIS worker process crashes and is recycled, you will lose all session
variables.
-Altaf[MVP]
------------------------------------------------------------ --------------------
All that glitters has a high refractive index.
www.mendhak.com
"bluewind44" wrote in message
news:1129714096.221184.53580@g44g2000cwa.googlegroups.com...
> Thanks for the reply.
>
> Actually I don't use session varaiable on the webservice project.
> I just use in a UI Projects and save it as a string variable.
> Then I call my webservie project by using the string variable.
>
> You mentioned about removement of session variable.
> What cause removing the session variable ?
>
> -----------------------
> Kevin Lee
>
Re: Session variable expirement.
am 19.10.2005 12:37:03 von nomailreplies
Unless you are using State Server or SQL Server
to maintain state for your applications, of course.
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en EspaƱol : http://asp.net.do/foros/
======================================
"S.M. Altaf [MVP]" wrote in message
news:eMpGPcJ1FHA.916@TK2MSFTNGP10.phx.gbl...
> If, for some reason, the ASP.NET worker process crashes and gets recycles, or the IIS
> worker process crashes and is recycled, you will lose all session variables.
>
> -Altaf[MVP]
> ------------------------------------------------------------ --------------------
> All that glitters has a high refractive index.
> www.mendhak.com
> "bluewind44" wrote in message
> news:1129714096.221184.53580@g44g2000cwa.googlegroups.com...
>> Thanks for the reply.
>>
>> Actually I don't use session varaiable on the webservice project.
>> I just use in a UI Projects and save it as a string variable.
>> Then I call my webservie project by using the string variable.
>>
>> You mentioned about removement of session variable.
>> What cause removing the session variable ?
>>
>> -----------------------
>> Kevin Lee
>>
>
>
Re: Session variable expirement.
am 20.10.2005 02:41:18 von bluewind44
Thanks really for all replies. ^_^