473,387 Members | 1,582 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Cannot Extent Session Timeout Without Cookieless Session

22
Hi all,

I'm having a problem with extending Session Timeouts... hopin someone can help..

This is the line under my <system.web> tag in my web.config:
Expand|Select|Wrap|Line Numbers
  1. <sessionState mode="InProc" timeout="45" cookieless="AutoDetect"></sessionState>
The line above does not extend my session. However, if I set cookieless="true", it seems to work just fine.

I don't want the sessionID in my client's address bar and I've looked throughout my code to ensure that the session is not being set elsewhere.

I should also add that the sessionState tag above will work if I put the value below the .NET default (which I believe the 20min).

Any thoughts?
Nov 6 '08 #1
5 1559
Plater
7,872 Expert 4TB
When you set the timeout to be 45 in your web.config, what does it claim the timeout it when you go to the aspNET config?
Nov 6 '08 #2
Mugs321
22
I'm a little unclear what exactly you mean by my ASPNet Config. Are you referring to the server/application configuration?

I looked in the Aspnet.config in my Framework directory and it contains this:
Expand|Select|Wrap|Line Numbers
  1.  <?xml version="1.0" encoding="UTF-8" ?>
  2. <configuration>
  3.     <runtime>
  4.         <legacyUnhandledExceptionPolicy enabled="false" />
  5.         <legacyImpersonationPolicy enabled="true"/>
  6.         <alwaysFlowImpersonationPolicy enabled="false"/>
  7.         <SymbolReadingPolicy enabled="1" />
  8.     </runtime>
  9. </configuration>
  10.  
I ran a trace on my page and I found this in the Headers Collection:
Expand|Select|Wrap|Line Numbers
  1. Cookie  -  hidefield=; ASP.NET_SessionId=xs1tth551ae1sai4rkjxetbr
There was no reference to any timeout values anywhere in my trace.
Nov 6 '08 #3
Plater
7,872 Expert 4TB
When you go to the IIS configuration (under admin tools)
And select the exact web(whatever) that you want to look at, for my example "testDB" is the one I look at.
I go to properties of it, select the ASPNET tab (which will tell you which version of ASPNET the website is configured for) and chose to "edit configuration"
A new window pops up with a number of tabs, "state management" has the session stuff.
This tab *SHOULD* reflect what is contained in your web.config, assuming everything is correct.
Nov 6 '08 #4
Mugs321
22
Hi there,

That tab, on both my local machine's IIS and the dev server's IIS, read the same as the values in my web.config. However, the dev server seems to be ignoring these values and returning to the default 20...
Nov 10 '08 #5
Plater
7,872 Expert 4TB
That is only 20mins of not activity.
If it works on the real server, does it matter on the dev server?

You do know that every recompile/publish/etc of the website will wipe out the Session state right?
Nov 10 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Geigho | last post by:
Setting session timeout in web.config file does not seem to have any effect. Any explanation or suggestion will be appreciated.
4
by: DavidS | last post by:
First: There are several ways to confuse one regarding session timeout. (1) web.config - <sessionState timeout="20"> (2) IIS Manager | Internet Information Services | ServerNode | Default Web Site...
8
by: bdeviled | last post by:
I am deploying to a web environment that uses load balancing and to insure that sessions persist across servers, the environment uses SQL to manage sessions. The machine.config file determines how...
4
by: UJ | last post by:
I have a page where the user can upload a video file. As you can guess, this may take a while. Is there a way I can change the session timeout for just this one page? I would also want to change...
9
by: Elliot | last post by:
I put <sessionState cookieless="false" timeout="6000"/> in <system.web> However, the session defined as session = "Peter"; sometimes is 'erased' in 10 minutes, or even in 2 minutes. What's...
3
by: trullock | last post by:
Hi, I want to test some session timeout code ive written but im getting a few problems. I want to reduce the session timeout to 1min so i dont have to wait around for 20 min to see if my code...
8
by: Andy B | last post by:
Is there a way to refer to things in Session object without calling Session itself?
7
by: Microsoft Newsserver | last post by:
Hi Folks. I have an issue I need some help with if thats OK. I am running Framework 2.0 using Windows Integrated Security. For most of the application we manage session timeouts without the...
7
by: anithaapr05 | last post by:
Hi, I am creating a session when user successfully login to the site and user gets a form to input some data into database. Assume that user entered data into some fileds and let the browser...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.