Showing posts with label instance. Show all posts
Showing posts with label instance. Show all posts

Saturday, March 31, 2012

Session Timeouts

I have developed an asp.net 2.0 app on my instance of server2003 and have
set IIS to timout in 40 minutes (asp.net|configuration) and it works just
fine - the app won't timeout until 40 minutes of inactivity passes.
However when deployed to a production server2003 machine with the very same
IIS settings, the app times out in 20 minutes. I have no specific timeout
statement either in code or web.config.
Any ideas?
Regards,
Gary BlakelyOn May 25, 6:48 am, "GaryDean" <GaryD...@.newsgroups.nospam> wrote:
> I have developed an asp.net 2.0 app on my instance of server2003 and have
> set IIS to timout in 40 minutes (asp.net|configuration) and it works just
> fine - the app won't timeout until 40 minutes of inactivity passes.
> However when deployed to a production server2003 machine with the very sam
e
> IIS settings, the app times out in 20 minutes. I have no specific timeout
> statement either in code or web.config.
> Any ideas?
> --
> Regards,
> Gary Blakely
Hi Gary...
20 min is a default timeout period...
please add timeout configuration in web.config and set it to 40 min...
if this problem still remains please check your machine.config
file...
Thanks
Masudur
I guess I failed to say that I have tried all of the obvious solutions, some
of which, you suggest.
Regards,
Gary Blakely
"Masudur" <munnacs@.gmail.com> wrote in message
news:1180069599.240101.129060@.g4g2000hsf.googlegroups.com...
> On May 25, 6:48 am, "GaryDean" <GaryD...@.newsgroups.nospam> wrote:
> Hi Gary...
> 20 min is a default timeout period...
> please add timeout configuration in web.config and set it to 40 min...
> if this problem still remains please check your machine.config
> file...
> Thanks
> Masudur
>
On May 27, 6:53 pm, "GaryDean" <GaryD...@.newsgroups.nospam> wrote:
> I guess I failed to say that I have tried all of the obvious solutions, so
me
> of which, you suggest.
>
So, did you tried to set timeout in the web.config file?
<sessionState mode="InProc"
cookieless="true"
timeout="40"/>
Hi Gary,
This issue does look strange, if you're pretty sure that the obvious
web.config settings and IIS settings are correctly configured:
1) web.config, see Alexey's suggestion.
2) IIS: virtual directory properties -> (Directory) Configuration ->
(Options) "Session timeout".
Maybe we're lack of some context or background information, would you
please depict more on the other configuration settings your web site
having? Thanks.
Regards,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support
========================================
==========
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.
Walter,
Is there some reason cookieless="true" has to be coupled with the timeout
setting?
BTW, are there any downsides to cookieless sessions other than having the
sessionID in the url?
Regards,
Gary Blakely
"Walter Wang [MSFT]" <wawang@.online.microsoft.com> wrote in message
news:3X3TzCZoHHA.1144@.TK2MSFTNGHUB02.phx.gbl...
> Hi Gary,
> This issue does look strange, if you're pretty sure that the obvious
> web.config settings and IIS settings are correctly configured:
> 1) web.config, see Alexey's suggestion.
> 2) IIS: virtual directory properties -> (Directory) Configuration ->
> (Options) "Session timeout".
>
> Maybe we're lack of some context or background information, would you
> please depict more on the other configuration settings your web site
> having? Thanks.
>
> Regards,
> Walter Wang (wawang@.online.microsoft.com, remove 'online.')
> Microsoft Online Community Support
> ========================================
==========
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ========================================
==========
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
also, this is a little strange...
if iis is set to 20 and my web.config says timeout="40" at 22 minutes of no
activity the user does not get the login screen, the session variables are
just null.
Regards,
Gary Blakely
"Walter Wang [MSFT]" <wawang@.online.microsoft.com> wrote in message
news:3X3TzCZoHHA.1144@.TK2MSFTNGHUB02.phx.gbl...
> Hi Gary,
> This issue does look strange, if you're pretty sure that the obvious
> web.config settings and IIS settings are correctly configured:
> 1) web.config, see Alexey's suggestion.
> 2) IIS: virtual directory properties -> (Directory) Configuration ->
> (Options) "Session timeout".
>
> Maybe we're lack of some context or background information, would you
> please depict more on the other configuration settings your web site
> having? Thanks.
>
> Regards,
> Walter Wang (wawang@.online.microsoft.com, remove 'online.')
> Microsoft Online Community Support
> ========================================
==========
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ========================================
==========
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
I have new information and I am going to start a new thread on this
Regards,
Gary Blakely
"Walter Wang [MSFT]" <wawang@.online.microsoft.com> wrote in message
news:3X3TzCZoHHA.1144@.TK2MSFTNGHUB02.phx.gbl...
> Hi Gary,
> This issue does look strange, if you're pretty sure that the obvious
> web.config settings and IIS settings are correctly configured:
> 1) web.config, see Alexey's suggestion.
> 2) IIS: virtual directory properties -> (Directory) Configuration ->
> (Options) "Session timeout".
>
> Maybe we're lack of some context or background information, would you
> please depict more on the other configuration settings your web site
> having? Thanks.
>
> Regards,
> Walter Wang (wawang@.online.microsoft.com, remove 'online.')
> Microsoft Online Community Support
> ========================================
==========
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ========================================
==========
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>

Session Timeouts

I have developed an asp.net 2.0 app on my instance of server2003 and have
set IIS to timout in 40 minutes (asp.net|configuration) and it works just
fine - the app won't timeout until 40 minutes of inactivity passes.

However when deployed to a production server2003 machine with the very same
IIS settings, the app times out in 20 minutes. I have no specific timeout
statement either in code or web.config.

Any ideas?

--
Regards,
Gary BlakelyOn May 25, 6:48 am, "GaryDean" <GaryD...@.newsgroups.nospamwrote:

Quote:

Originally Posted by

I have developed an asp.net 2.0 app on my instance of server2003 and have
set IIS to timout in 40 minutes (asp.net|configuration) and it works just
fine - the app won't timeout until 40 minutes of inactivity passes.
>
However when deployed to a production server2003 machine with the very same
IIS settings, the app times out in 20 minutes. I have no specific timeout
statement either in code or web.config.
>
Any ideas?
>
--
Regards,
Gary Blakely


Hi Gary...

20 min is a default timeout period...
please add timeout configuration in web.config and set it to 40 min...
if this problem still remains please check your machine.config
file...

Thanks
Masudur
I guess I failed to say that I have tried all of the obvious solutions, some
of which, you suggest.

--
Regards,
Gary Blakely
"Masudur" <munnacs@.gmail.comwrote in message
news:1180069599.240101.129060@.g4g2000hsf.googlegro ups.com...

Quote:

Originally Posted by

On May 25, 6:48 am, "GaryDean" <GaryD...@.newsgroups.nospamwrote:

Quote:

Originally Posted by

>I have developed an asp.net 2.0 app on my instance of server2003 and have
>set IIS to timout in 40 minutes (asp.net|configuration) and it works just
>fine - the app won't timeout until 40 minutes of inactivity passes.
>>
>However when deployed to a production server2003 machine with the very
>same
>IIS settings, the app times out in 20 minutes. I have no specific
>timeout
>statement either in code or web.config.
>>
>Any ideas?
>>
>--
>Regards,
>Gary Blakely


>
Hi Gary...
>
20 min is a default timeout period...
please add timeout configuration in web.config and set it to 40 min...
if this problem still remains please check your machine.config
file...
>
Thanks
Masudur
>


On May 27, 6:53 pm, "GaryDean" <GaryD...@.newsgroups.nospamwrote:

Quote:

Originally Posted by

I guess I failed to say that I have tried all of the obvious solutions, some
of which, you suggest.
>


So, did you tried to set timeout in the web.config file?

<sessionState mode="InProc"
cookieless="true"
timeout="40"/>
Hi Gary,

This issue does look strange, if you're pretty sure that the obvious
web.config settings and IIS settings are correctly configured:

1) web.config, see Alexey's suggestion.

2) IIS: virtual directory properties -(Directory) Configuration ->
(Options) "Session timeout".

Maybe we're lack of some context or background information, would you
please depict more on the other configuration settings your web site
having? Thanks.

Regards,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Walter,
Is there some reason cookieless="true" has to be coupled with the timeout
setting?

BTW, are there any downsides to cookieless sessions other than having the
sessionID in the url?

--
Regards,
Gary Blakely
"Walter Wang [MSFT]" <wawang@.online.microsoft.comwrote in message
news:3X3TzCZoHHA.1144@.TK2MSFTNGHUB02.phx.gbl...

Quote:

Originally Posted by

Hi Gary,
>
This issue does look strange, if you're pretty sure that the obvious
web.config settings and IIS settings are correctly configured:
>
1) web.config, see Alexey's suggestion.
>
2) IIS: virtual directory properties -(Directory) Configuration ->
(Options) "Session timeout".
>
>
Maybe we're lack of some context or background information, would you
please depict more on the other configuration settings your web site
having? Thanks.
>
>
Regards,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support
>
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
>
This posting is provided "AS IS" with no warranties, and confers no
rights.
>


also, this is a little strange...
if iis is set to 20 and my web.config says timeout="40" at 22 minutes of no
activity the user does not get the login screen, the session variables are
just null.

--
Regards,
Gary Blakely

"Walter Wang [MSFT]" <wawang@.online.microsoft.comwrote in message
news:3X3TzCZoHHA.1144@.TK2MSFTNGHUB02.phx.gbl...

Quote:

Originally Posted by

Hi Gary,
>
This issue does look strange, if you're pretty sure that the obvious
web.config settings and IIS settings are correctly configured:
>
1) web.config, see Alexey's suggestion.
>
2) IIS: virtual directory properties -(Directory) Configuration ->
(Options) "Session timeout".
>
>
Maybe we're lack of some context or background information, would you
please depict more on the other configuration settings your web site
having? Thanks.
>
>
Regards,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support
>
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
>
This posting is provided "AS IS" with no warranties, and confers no
rights.
>


I have new information and I am going to start a new thread on this

--
Regards,
Gary Blakely
"Walter Wang [MSFT]" <wawang@.online.microsoft.comwrote in message
news:3X3TzCZoHHA.1144@.TK2MSFTNGHUB02.phx.gbl...

Quote:

Originally Posted by

Hi Gary,
>
This issue does look strange, if you're pretty sure that the obvious
web.config settings and IIS settings are correctly configured:
>
1) web.config, see Alexey's suggestion.
>
2) IIS: virtual directory properties -(Directory) Configuration ->
(Options) "Session timeout".
>
>
Maybe we're lack of some context or background information, would you
please depict more on the other configuration settings your web site
having? Thanks.
>
>
Regards,
Walter Wang (wawang@.online.microsoft.com, remove 'online.')
Microsoft Online Community Support
>
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
>
This posting is provided "AS IS" with no warranties, and confers no
rights.
>

Saturday, March 24, 2012

session variable only accessable through page behind class instance?

Are session variables available to any class instance within a project namespace or only for use for the form codebehind class?

I have tried to set a session variable on a code behind class and then retrieve its value in a class instance used by the codebehind class and I get errors. Maybe I'm just not meant to access that way and only codebehind classes (classes that inherit System.Web.UI.Page) can use them?As far as I know session variables are only available in aspx pages.

That does not prevent you from passing value of your session variables to any of your business tier objects.
It's more a question of context.
Within the context of the ASP.NET process, any class can get to the session using HttpContext.Current.Session.
Thanks very much for the help!

Thursday, March 22, 2012

Session Variables

I have my session timeout at 20 minutes. Is there a way
to set session time per variable. For instance: I
create session("TEST") and I want it to expire in 2
minutes of no activity...Is that possible?

For Clarification:
If session time out in the web.config file is set to 20
minutes the session only times out if no activity occurs,
right!

ThanksNope. Just clear this variable when it is no more needed ? Use a timestamp ?

What is scenario ?

--

"brian" <bshannon@.lbrspec.com> a crit dans le message de
news:1b3d201c44fb8$dcb60670$a101280a@.phx.gbl...
> I have my session timeout at 20 minutes. Is there a way
> to set session time per variable. For instance: I
> create session("TEST") and I want it to expire in 2
> minutes of no activity...Is that possible?
> For Clarification:
> If session time out in the web.config file is set to 20
> minutes the session only times out if no activity occurs,
> right!
>
> Thanks
I think you can consider the use of Cache class
Page.Cache.Insert("KEY", value, null, DateTime.Now.AddMinutes(2),
TimeSpan.Zero);
will insert a value that will expire in 2 minutes without sliding
expiration.
See System.Web.Caching.Cache class for more information about this.

I hope this helps

brian wrote:
> I have my session timeout at 20 minutes. Is there a way
> to set session time per variable. For instance: I
> create session("TEST") and I want it to expire in 2
> minutes of no activity...Is that possible?
> For Clarification:
> If session time out in the web.config file is set to 20
> minutes the session only times out if no activity occurs,
> right!
Yes. If something happen the timeout is slided with another 20 minutes.

>
> Thanks
>

Session Variables

I have my session timeout at 20 minutes. Is there a way
to set session time per variable. For instance: I
create session("TEST") and I want it to expire in 2
minutes of no activity...Is that possible?
For Clarification:
If session time out in the web.config file is set to 20
minutes the session only times out if no activity occurs,
right!
ThanksNope. Just clear this variable when it is no more needed ? Use a timestamp ?
What is scenario ?
"brian" <bshannon@.lbrspec.com> a crit dans le message de
news:1b3d201c44fb8$dcb60670$a101280a@.phx
.gbl...
> I have my session timeout at 20 minutes. Is there a way
> to set session time per variable. For instance: I
> create session("TEST") and I want it to expire in 2
> minutes of no activity...Is that possible?
> For Clarification:
> If session time out in the web.config file is set to 20
> minutes the session only times out if no activity occurs,
> right!
>
> Thanks
>
I think you can consider the use of Cache class
Page.Cache.Insert("KEY", value, null, DateTime.Now.AddMinutes(2),
TimeSpan.Zero);
will insert a value that will expire in 2 minutes without sliding
expiration.
See System.Web.Caching.Cache class for more information about this.
I hope this helps
brian wrote:
> I have my session timeout at 20 minutes. Is there a way
> to set session time per variable. For instance: I
> create session("TEST") and I want it to expire in 2
> minutes of no activity...Is that possible?
> For Clarification:
> If session time out in the web.config file is set to 20
> minutes the session only times out if no activity occurs,
> right!
Yes. If something happen the timeout is slided with another 20 minutes.

>
> Thanks
>