Tuesday, March 13, 2012

Trouble With Session State

Hello,

I am having trouble with session state in my asp.net 1.1 C# web app. I
am trying to program either a popup box warning of expiration, or I
may do a redirect to the home page upon expiration.

But I can't seem to get started, because I am getting values that I do
not understand. In IIS settings, I stopped my website/app and went
into the properties for it and selected the "Home Directory" tab. Then
I clicked the "Configuration" button and selected the "Options" tab.
Then under the "Application Configuration" group, I verified that the
box for "Enable session state" was checked. Then I changed the value
to "2" (just for testing). I then saved and restarted my website.

Then I opened the site in Visual Studio.net and went into the
web.config file and changed the forms authentication timeout value to
"1" (again, just for testing).

Then when I ran my code, in debug mode/step through, I can see that
the value being returned for "this.Session.Timeout" is "15"? What's
going on here? I thought that when I set the value in IIS, it would
make it 2, but that didn't happen? Where is this number coming from?
How can I change/control it?

Your help is much appreciated.

JP"Joey" <joey.powell@.topscene.comwrote in message
news:1176914556.144456.278850@.b75g2000hsg.googlegr oups.com...

Quote:

Originally Posted by

Hello,
>
I am having trouble with session state in my asp.net 1.1 C# web app. I
am trying to program either a popup box warning of expiration, or I
may do a redirect to the home page upon expiration.
>
But I can't seem to get started, because I am getting values that I do
not understand. In IIS settings, I stopped my website/app and went
into the properties for it and selected the "Home Directory" tab. Then
I clicked the "Configuration" button and selected the "Options" tab.
Then under the "Application Configuration" group, I verified that the
box for "Enable session state" was checked. Then I changed the value
to "2" (just for testing). I then saved and restarted my website.


I believe these values are for classic ASP, not for ASP.NET.
--

John Saunders [MVP]
On Apr 18, 12:34 pm, "John Saunders [MVP]" <john.saunders at
trizetto.comwrote:

Quote:

Originally Posted by

"Joey" <joey.pow...@.topscene.comwrote in message
>
news:1176914556.144456.278850@.b75g2000hsg.googlegr oups.com...
>

Quote:

Originally Posted by

Hello,


>

Quote:

Originally Posted by

I am having trouble with session state in my asp.net 1.1 C# web app. I
am trying to program either a popup box warning of expiration, or I
may do a redirect to the home page upon expiration.


>

Quote:

Originally Posted by

But I can't seem to get started, because I am getting values that I do
not understand. In IIS settings, I stopped my website/app and went
into the properties for it and selected the "Home Directory" tab. Then
I clicked the "Configuration" button and selected the "Options" tab.
Then under the "Application Configuration" group, I verified that the
box for "Enable session state" was checked. Then I changed the value
to "2" (just for testing). I then saved and restarted my website.


>
I believe these values are for classic ASP, not for ASP.NET.
--
>
John Saunders [MVP]


So how does one set session timeout for asp.net?
Use the sessionState entry in Web.Config...
--
Brad

"Software is like melted pudding..."

"Joey" wrote:

Quote:

Originally Posted by

On Apr 18, 12:34 pm, "John Saunders [MVP]" <john.saunders at
trizetto.comwrote:

Quote:

Originally Posted by

"Joey" <joey.pow...@.topscene.comwrote in message

news:1176914556.144456.278850@.b75g2000hsg.googlegr oups.com...

Quote:

Originally Posted by

Hello,


Quote:

Originally Posted by

I am having trouble with session state in my asp.net 1.1 C# web app. I
am trying to program either a popup box warning of expiration, or I
may do a redirect to the home page upon expiration.


Quote:

Originally Posted by

But I can't seem to get started, because I am getting values that I do
not understand. In IIS settings, I stopped my website/app and went
into the properties for it and selected the "Home Directory" tab. Then
I clicked the "Configuration" button and selected the "Options" tab.
Then under the "Application Configuration" group, I verified that the
box for "Enable session state" was checked. Then I changed the value
to "2" (just for testing). I then saved and restarted my website.


I believe these values are for classic ASP, not for ASP.NET.
--

John Saunders [MVP]


>
So how does one set session timeout for asp.net?
>
>


On Apr 18, 12:54 pm, Brad Roberts <BradRoberts56noj...@.hotmail.com>
wrote:

Quote:

Originally Posted by

Use the sessionState entry in Web.Config...
--
Brad
>
"Software is like melted pudding..."
>
>
>
"Joey" wrote:

Quote:

Originally Posted by

On Apr 18, 12:34 pm, "John Saunders [MVP]" <john.saunders at
trizetto.comwrote:

Quote:

Originally Posted by

"Joey" <joey.pow...@.topscene.comwrote in message


>

Quote:

Originally Posted by

Quote:

Originally Posted by

>news:1176914556.144456.278850@.b75g2000hsg.googlegr oups.com...


>

Quote:

Originally Posted by

Quote:

Originally Posted by

Hello,


>

Quote:

Originally Posted by

Quote:

Originally Posted by

I am having trouble with session state in my asp.net 1.1 C# web app. I
am trying to program either a popup box warning of expiration, or I
may do a redirect to the home page upon expiration.


>

Quote:

Originally Posted by

Quote:

Originally Posted by

But I can't seem to get started, because I am getting values that I do
not understand. In IIS settings, I stopped my website/app and went
into the properties for it and selected the "Home Directory" tab. Then
I clicked the "Configuration" button and selected the "Options" tab.
Then under the "Application Configuration" group, I verified that the
box for "Enable session state" was checked. Then I changed the value
to "2" (just for testing). I then saved and restarted my website.


>

Quote:

Originally Posted by

Quote:

Originally Posted by

I believe these values are for classic ASP, not for ASP.NET.
--


>

Quote:

Originally Posted by

Quote:

Originally Posted by

John Saunders [MVP]


>

Quote:

Originally Posted by

So how does one set session timeout for asp.net?- Hide quoted text -


>
- Show quoted text -


Thanks

0 comments:

Post a Comment