Session timeout

Session timeout

am 18.12.2007 17:35:18 von Elliot

I put

in


However, the session["user"] defined as
session["user"] = "Peter";
sometimes is 'erased' in 10 minutes, or even in 2 minutes.

What's wrong with my code?
Thanks for your idea.

RE: Session timeout

am 18.12.2007 18:07:02 von brucebarker

one of tweo issues.

1) you are using inproc sessions, and had an asp.net application recycle
(too much memory, file changes, etc).

2) you have a redirect without the session guid in the url.

-- bruce (sqlwork.com)


"Elliot" wrote:

> I put
>
> in
>
>
> However, the session["user"] defined as
> session["user"] = "Peter";
> sometimes is 'erased' in 10 minutes, or even in 2 minutes.
>
> What's wrong with my code?
> Thanks for your idea.

Re: Session timeout

am 18.12.2007 18:13:20 von NoSpamMgbworld

How are you testing the timeout? Simply surfing the site? If so, is the site
published or are you in debug mode?

What I am getting at is it is really hard to tell what is happening here. In
general, the timeout is respected, but things like server problems can kack
it. If you go to SQL State, it is a bit less problematic, if it is a server
problem, but it requires a bit more overhead in most cases (if nothing else,
adding SQL to the mix).

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
"Elliot" wrote in message
news:513B7429-DDC4-4E34-A95A-CC1EFD21C8CA@microsoft.com...
>I put
> in
>
>
> However, the session["user"] defined as
> session["user"] = "Peter";
> sometimes is 'erased' in 10 minutes, or even in 2 minutes.
>
> What's wrong with my code?
> Thanks for your idea.

Re: Session timeout

am 18.12.2007 18:23:37 von NoSpamMgbworld

Not #2, as he is not using cookieless (false).

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
"bruce barker" wrote in message
news:A97698F3-9E04-4583-B1F7-91D06F0D0028@microsoft.com...
> one of tweo issues.
>
> 1) you are using inproc sessions, and had an asp.net application recycle
> (too much memory, file changes, etc).
>
> 2) you have a redirect without the session guid in the url.
>
> -- bruce (sqlwork.com)
>
>
> "Elliot" wrote:
>
>> I put
>>
>> in
>>
>>
>> However, the session["user"] defined as
>> session["user"] = "Peter";
>> sometimes is 'erased' in 10 minutes, or even in 2 minutes.
>>
>> What's wrong with my code?
>> Thanks for your idea.

RE: Session timeout

am 18.12.2007 19:22:00 von pbromberg

In addition to the responses from Bruce and Greg, it may be advisable not to
do your "testing" on localhost - test it from a remote machine.
--Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com


"Elliot" wrote:

> I put
>
> in
>
>
> However, the session["user"] defined as
> session["user"] = "Peter";
> sometimes is 'erased' in 10 minutes, or even in 2 minutes.
>
> What's wrong with my code?
> Thanks for your idea.

Re: Session timeout

am 19.12.2007 00:28:59 von Sal

Peter, I'm kind of wondering how to make that happen. Because in ASP.NET
2.0, VS2005 doesn't need to create the project below inetpub/wwwroot and
uses the personal webserver to debug. So, are you saying create the project
under wwwroot, open the project, place a breakpoint, hit it from another
machine and it will break on your breakpoint?
Can you expound on this further for us laymen???

Thanks
SAL

"Peter Bromberg [C# MVP]" wrote in message
news:B7D4EA16-7F71-44F3-9614-539B79BCDD85@microsoft.com...
> In addition to the responses from Bruce and Greg, it may be advisable not
> to
> do your "testing" on localhost - test it from a remote machine.
> --Peter
> Site: http://www.eggheadcafe.com
> UnBlog: http://petesbloggerama.blogspot.com
> MetaFinder: http://www.blogmetafinder.com
>
>
> "Elliot" wrote:
>
>> I put
>>
>> in
>>
>>
>> However, the session["user"] defined as
>> session["user"] = "Peter";
>> sometimes is 'erased' in 10 minutes, or even in 2 minutes.
>>
>> What's wrong with my code?
>> Thanks for your idea.

Re: Session timeout

am 19.12.2007 14:01:24 von Elliot

Maybe it's the problem that I run it in debug mode.


"Cowboy (Gregory A. Beamer)" wrote in
message news:eWX$NlZQIHA.4740@TK2MSFTNGP02.phx.gbl...
> How are you testing the timeout? Simply surfing the site? If so, is the
> site published or are you in debug mode?
>
> What I am getting at is it is really hard to tell what is happening here.
> In general, the timeout is respected, but things like server problems can
> kack it. If you go to SQL State, it is a bit less problematic, if it is a
> server problem, but it requires a bit more overhead in most cases (if
> nothing else, adding SQL to the mix).
>
> --
> Gregory A. Beamer
> MVP, MCP: +I, SE, SD, DBA
>
> *************************************************
> | Think outside the box! |
> *************************************************
> "Elliot" wrote in message
> news:513B7429-DDC4-4E34-A95A-CC1EFD21C8CA@microsoft.com...
>>I put
>> in
>>
>>
>> However, the session["user"] defined as
>> session["user"] = "Peter";
>> sometimes is 'erased' in 10 minutes, or even in 2 minutes.
>>
>> What's wrong with my code?
>> Thanks for your idea.
>
>

Re: Session timeout

am 19.12.2007 17:19:27 von NoSpamMgbworld

If it runs into any errors when you are debugging, it could well be kicking
you out of session. It is not a problem, so much, that you are debugging,
but that you have an issue that cannot be solved without kicking the
session. There are not a huge number that do, but enough it is a concern.

After you finish debugging, try working the app through the same scenario
and see if it still times out quickly. If so, download Process Explorer,
from Microsoft (bought from sysinternals) and watch the asp.net worker
process for your application. Pay attention to the process number. If it
changes, you have an issue that is causing the worker process to abort.
Watch what page(s) it flips on. If you can find a common theme (always does
a flip on X page), focus on that page.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
"Elliot" wrote in message
news:5E974E75-0D04-435F-84A5-63A00AE525E4@microsoft.com...
> Maybe it's the problem that I run it in debug mode.
>
>
> "Cowboy (Gregory A. Beamer)" wrote in
> message news:eWX$NlZQIHA.4740@TK2MSFTNGP02.phx.gbl...
>> How are you testing the timeout? Simply surfing the site? If so, is the
>> site published or are you in debug mode?
>>
>> What I am getting at is it is really hard to tell what is happening here.
>> In general, the timeout is respected, but things like server problems can
>> kack it. If you go to SQL State, it is a bit less problematic, if it is a
>> server problem, but it requires a bit more overhead in most cases (if
>> nothing else, adding SQL to the mix).
>>
>> --
>> Gregory A. Beamer
>> MVP, MCP: +I, SE, SD, DBA
>>
>> *************************************************
>> | Think outside the box! |
>> *************************************************
>> "Elliot" wrote in message
>> news:513B7429-DDC4-4E34-A95A-CC1EFD21C8CA@microsoft.com...
>>>I put
>>> in
>>>
>>>
>>> However, the session["user"] defined as
>>> session["user"] = "Peter";
>>> sometimes is 'erased' in 10 minutes, or even in 2 minutes.
>>>
>>> What's wrong with my code?
>>> Thanks for your idea.
>>
>>

Re: Session timeout

am 19.12.2007 17:21:14 von NoSpamMgbworld

For the unit testing, I see nothing insidious about testing on localhost,
but I would concur that testing has to occur on a test machine prior to
deployment to production, esp. if you are causing recycling of the worker
process. While you can get around worker process flips by holding state in
SQL Server, I would not recommend a SQL state to avoid something you can
cure by finding out what is causing the flip.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
"Peter Bromberg [C# MVP]" wrote in message
news:B7D4EA16-7F71-44F3-9614-539B79BCDD85@microsoft.com...
> In addition to the responses from Bruce and Greg, it may be advisable not
> to
> do your "testing" on localhost - test it from a remote machine.
> --Peter
> Site: http://www.eggheadcafe.com
> UnBlog: http://petesbloggerama.blogspot.com
> MetaFinder: http://www.blogmetafinder.com
>
>
> "Elliot" wrote:
>
>> I put
>>
>> in
>>
>>
>> However, the session["user"] defined as
>> session["user"] = "Peter";
>> sometimes is 'erased' in 10 minutes, or even in 2 minutes.
>>
>> What's wrong with my code?
>> Thanks for your idea.

Re: Session timeout

am 20.12.2007 18:48:49 von Elliot

Your ideas are highly appreciated.


"Cowboy (Gregory A. Beamer)" wrote in
message news:OPGnxrlQIHA.4128@TK2MSFTNGP06.phx.gbl...
> If it runs into any errors when you are debugging, it could well be
> kicking you out of session. It is not a problem, so much, that you are
> debugging, but that you have an issue that cannot be solved without
> kicking the session. There are not a huge number that do, but enough it is
> a concern.
>
> After you finish debugging, try working the app through the same scenario
> and see if it still times out quickly. If so, download Process Explorer,
> from Microsoft (bought from sysinternals) and watch the asp.net worker
> process for your application. Pay attention to the process number. If it
> changes, you have an issue that is causing the worker process to abort.
> Watch what page(s) it flips on. If you can find a common theme (always
> does a flip on X page), focus on that page.
>
> --
> Gregory A. Beamer
> MVP, MCP: +I, SE, SD, DBA
>
> *************************************************
> | Think outside the box! |
> *************************************************
> "Elliot" wrote in message
> news:5E974E75-0D04-435F-84A5-63A00AE525E4@microsoft.com...
>> Maybe it's the problem that I run it in debug mode.
>>
>>
>> "Cowboy (Gregory A. Beamer)" wrote in
>> message news:eWX$NlZQIHA.4740@TK2MSFTNGP02.phx.gbl...
>>> How are you testing the timeout? Simply surfing the site? If so, is the
>>> site published or are you in debug mode?
>>>
>>> What I am getting at is it is really hard to tell what is happening
>>> here. In general, the timeout is respected, but things like server
>>> problems can kack it. If you go to SQL State, it is a bit less
>>> problematic, if it is a server problem, but it requires a bit more
>>> overhead in most cases (if nothing else, adding SQL to the mix).
>>>
>>> --
>>> Gregory A. Beamer
>>> MVP, MCP: +I, SE, SD, DBA
>>>
>>> *************************************************
>>> | Think outside the box! |
>>> *************************************************
>>> "Elliot" wrote in message
>>> news:513B7429-DDC4-4E34-A95A-CC1EFD21C8CA@microsoft.com...
>>>>I put
>>>> in
>>>>
>>>>
>>>> However, the session["user"] defined as
>>>> session["user"] = "Peter";
>>>> sometimes is 'erased' in 10 minutes, or even in 2 minutes.
>>>>
>>>> What's wrong with my code?
>>>> Thanks for your idea.
>>>
>>>
>
>