Showing posts with label vaiables. Show all posts
Showing posts with label vaiables. Show all posts

Saturday, March 31, 2012

session vaiables lost randomly

i am developing an asp.net web based application using javascript as the server side scripting language. The application makes constant use of an access database and session variables. in a random way, the session variables are lost causing the application to break. The only software on the xp-pro box is iis, .NET framework, office 2003 and 3 com objects: aspmail, aspimage and aspsmartupload. There is no virus detection software.

Anybody have an idea why the session variables are randomly lost ?

thanks, rich"i am developing an asp.net web based application using javascript as the
server side scripting language"
is this possible? What are you using to develope this? Better yet, why are
you using javascript as a serverside .NET language?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com

"rich00" <rich00@.discussions.microsoft.com> wrote in message
news:C0B5DB69-E5F5-4946-917A-CBE4ED71325B@.microsoft.com...
> i am developing an asp.net web based application using javascript as the
server side scripting language. The application makes constant use of an
access database and session variables. in a random way, the session
variables are lost causing the application to break. The only software on
the xp-pro box is iis, .NET framework, office 2003 and 3 com objects:
aspmail, aspimage and aspsmartupload. There is no virus detection software.
> Anybody have an idea why the session variables are randomly lost ?
> thanks, rich
this application is a port from asp to asp.net

asp only suppoted basic or javascript. the choice of javacript over basic was easy.

"rich00" wrote:

> i am developing an asp.net web based application using javascript as the server side scripting language. The application makes constant use of an access database and session variables. in a random way, the session variables are lost causing the application to break. The only software on the xp-pro box is iis, .NET framework, office 2003 and 3 com objects: aspmail, aspimage and aspsmartupload. There is no virus detection software.
> Anybody have an idea why the session variables are randomly lost ?
> thanks, rich
jscript.net is a fine language, it only downside is lack of ide support.

anyway, lots of events trigger loss of session. any recompile of the app or
reload of the domain, cause session data to be lost with the inproc session
manager. check the event log form appdomain recycles.

if you want a stable site, you should not use inproc, but the sql session
manager (works with the free msde).

-- bruce (sqlwork.com)

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:uA6taC$TEHA.3012@.tk2msftngp13.phx.gbl...
> "i am developing an asp.net web based application using javascript as the
> server side scripting language"
> is this possible? What are you using to develope this? Better yet, why are
> you using javascript as a serverside .NET language?
> --
> Curt Christianson
> Owner/Lead Developer, DF-Software
> Site: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
> "rich00" <rich00@.discussions.microsoft.com> wrote in message
> news:C0B5DB69-E5F5-4946-917A-CBE4ED71325B@.microsoft.com...
> > i am developing an asp.net web based application using javascript as the
> server side scripting language. The application makes constant use of an
> access database and session variables. in a random way, the session
> variables are lost causing the application to break. The only software on
> the xp-pro box is iis, .NET framework, office 2003 and 3 com objects:
> aspmail, aspimage and aspsmartupload. There is no virus detection
software.
> > Anybody have an idea why the session variables are randomly lost ?
> > thanks, rich
>i am developing an asp.net web based application using javascript as the
>server side scripting language

wow, can i see that code please.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"rich00" <rich00@.discussions.microsoft.com> wrote in message
news:C0B5DB69-E5F5-4946-917A-CBE4ED71325B@.microsoft.com...
>i am developing an asp.net web based application using javascript as the
>server side scripting language. The application makes constant use of an
>access database and session variables. in a random way, the session
>variables are lost causing the application to break. The only software on
>the xp-pro box is iis, .NET framework, office 2003 and 3 com objects:
>aspmail, aspimage and aspsmartupload. There is no virus detection software.
> Anybody have an idea why the session variables are randomly lost ?
> thanks, rich
the app consists of 1000+ scripts. i can send you a smple sctipt or 2. the app builds database driven web sites.

"Alvin Bruney [MVP]" wrote:

> >i am developing an asp.net web based application using javascript as the
> >server side scripting language
> wow, can i see that code please.
> --
> Regards,
> Alvin Bruney
> [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
> Got tidbits? Get it here... http://tinyurl.com/27cok
> "rich00" <rich00@.discussions.microsoft.com> wrote in message
> news:C0B5DB69-E5F5-4946-917A-CBE4ED71325B@.microsoft.com...
> >i am developing an asp.net web based application using javascript as the
> >server side scripting language. The application makes constant use of an
> >access database and session variables. in a random way, the session
> >variables are lost causing the application to break. The only software on
> >the xp-pro box is iis, .NET framework, office 2003 and 3 com objects:
> >aspmail, aspimage and aspsmartupload. There is no virus detection software.
> > Anybody have an idea why the session variables are randomly lost ?
> > thanks, rich
>

session vaiables lost randomly

i am developing an asp.net web based application using javascript as the ser
ver side scripting language. The application makes constant use of an access
database and session variables. in a random way, the session variables are
lost causing the applicatio
n to break. The only software on the xp-pro box is iis, .NET framework, offi
ce 2003 and 3 com objects: aspmail, aspimage and aspsmartupload. There is no
virus detection software.
Anybody have an idea why the session variables are randomly lost ?
thanks, rich"i am developing an asp.net web based application using javascript as the
server side scripting language"
is this possible? What are you using to develope this? Better yet, why are
you using javascript as a serverside .NET language?
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"rich00" <rich00@.discussions.microsoft.com> wrote in message
news:C0B5DB69-E5F5-4946-917A-CBE4ED71325B@.microsoft.com...
> i am developing an asp.net web based application using javascript as the
server side scripting language. The application makes constant use of an
access database and session variables. in a random way, the session
variables are lost causing the application to break. The only software on
the xp-pro box is iis, .NET framework, office 2003 and 3 com objects:
aspmail, aspimage and aspsmartupload. There is no virus detection software.
> Anybody have an idea why the session variables are randomly lost ?
> thanks, rich
this application is a port from asp to asp.net
asp only suppoted basic or javascript. the choice of javacript over basic wa
s easy.
"rich00" wrote:

> i am developing an asp.net web based application using javascript as the server si
de scripting language. The application makes constant use of an access database and
session variables. in a random way, the session variables are lost causing the appli
cat
ion to break. The only software on the xp-pro box is iis, .NET framework, office 2003 and 3
com objects: aspmail, aspimage and aspsmartupload. There is no virus detection software.[c
olor=darkred]
> Anybody have an idea why the session variables are randomly lost ?
> thanks, rich[/color]
jscript.net is a fine language, it only downside is lack of ide support.
anyway, lots of events trigger loss of session. any recompile of the app or
reload of the domain, cause session data to be lost with the inproc session
manager. check the event log form appdomain recycles.
if you want a stable site, you should not use inproc, but the sql session
manager (works with the free msde).
-- bruce (sqlwork.com)
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:uA6taC$TEHA.3012@.tk2msftngp13.phx.gbl...
> "i am developing an asp.net web based application using javascript as the
> server side scripting language"
> is this possible? What are you using to develope this? Better yet, why are
> you using javascript as a serverside .NET language?
> --
> Curt Christianson
> Owner/Lead Developer, DF-Software
> Site: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
> "rich00" <rich00@.discussions.microsoft.com> wrote in message
> news:C0B5DB69-E5F5-4946-917A-CBE4ED71325B@.microsoft.com...
> server side scripting language. The application makes constant use of an
> access database and session variables. in a random way, the session
> variables are lost causing the application to break. The only software on
> the xp-pro box is iis, .NET framework, office 2003 and 3 com objects:
> aspmail, aspimage and aspsmartupload. There is no virus detection
software.
>
>i am developing an asp.net web based application using javascript as the
>server side scripting language
wow, can i see that code please.
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"rich00" <rich00@.discussions.microsoft.com> wrote in message
news:C0B5DB69-E5F5-4946-917A-CBE4ED71325B@.microsoft.com...
>i am developing an asp.net web based application using javascript as the
>server side scripting language. The application makes constant use of an
>access database and session variables. in a random way, the session
>variables are lost causing the application to break. The only software on
>the xp-pro box is iis, .NET framework, office 2003 and 3 com objects:
>aspmail, aspimage and aspsmartupload. There is no virus detection software.
> Anybody have an idea why the session variables are randomly lost ?
> thanks, rich
the app consists of 1000+ scripts. i can send you a smple sctipt or 2. the a
pp builds database driven web sites.
"Alvin Bruney [MVP]" wrote:

> wow, can i see that code please.
> --
> Regards,
> Alvin Bruney
> [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
> Got tidbits? Get it here... http://tinyurl.com/27cok
> "rich00" <rich00@.discussions.microsoft.com> wrote in message
> news:C0B5DB69-E5F5-4946-917A-CBE4ED71325B@.microsoft.com...
>
>

Monday, March 26, 2012

Session variable expirement.

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.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 anythi
ng)
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
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
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" <bluewind44@.gmail.com> 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
>
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 Espaol : http://asp.net.do/foros/
======================================
"S.M. Altaf [MVP]" <smaltaf@.PLEASEDONTSPAMMEmsn.com> 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 variable
s.
> -Altaf[MVP]
> ----
--
> All that glitters has a high refractive index.
> www.mendhak.com

> "bluewind44" <bluewind44@.gmail.com> wrote in message
> news:1129714096.221184.53580@.g44g2000cwa.googlegroups.com...
>
Thanks really for all replies. ^_^

Session variable expirement.

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.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
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
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" <bluewind44@.gmail.com> wrote in message
news:1129714096.221184.53580@.g44g2000cwa.googlegro ups.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
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 Espaol : http://asp.net.do/foros/
======================================
"S.M. Altaf [MVP]" <smaltaf@.PLEASEDONTSPAMMEmsn.com> 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" <bluewind44@.gmail.com> wrote in message
> news:1129714096.221184.53580@.g44g2000cwa.googlegro ups.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
>>
Thanks really for all replies. ^_^