Solved

Session timeout isnt working....

Posted on 2008-10-24
5
266 Views
Last Modified: 2013-11-26
I want the Users Session to timeout after 20 min.

i have set IIS6 to 20 min, i set my global.asax  to 20 min(see code)
and i have set my web.config (see below)

The session gets timed out in about 1 min, but i cant seem to find why?
Any ideas?

I am using SQL Server 2005 backend DB

Thank you inadvance.
GLOBAL.ASAX
   Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
        ' Fires when the session is started
        Session.Timeout = 20
    End Sub
    Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
        ' Fires when the session ends
        Session.Abandon()
    End Sub
 
WEB.CONFIG
		<authentication mode="Forms">
			<forms name="MySite" loginUrl="Login.aspx" protection="All" timeout="20"></forms>
		</authentication>

Open in new window

0
Comment
Question by:16spam16
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 1

Author Comment

by:16spam16
ID: 22801262
I dont beleive this happens on my local testing PC, it happens once i deploy it t the server.  
So what that being said what in IIS, SQL Server, or my actual web app could be causing this?
Seems weird.
thank you in advance.
0
 
LVL 7

Expert Comment

by:ASPSQLServerCOM
ID: 22801907
best comment out one by one, means first try only with session time out from config file, do you experience same preoblem, if yes then remove the web config session time out and keep only IIS session time out, you will come to know exactly where the problem is

also the session time out what you are trying is a sub directory , define session time out at the root website level
many times web site override the root setting.
0
 
LVL 1

Author Comment

by:16spam16
ID: 22803233
Update...
I tried running my app from VS2008 on my local machince, but connecting to the production servers SQL DB...did not disconnect me.

SQL DB Eliminated as cause.

on my production server i have 1 other web app(3 small static websites and 1 FTP server) whose session works fine.
I THINK it must be in the setting s for that particular website.  

What should i check for in IIS?



0
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 22803838
as far as i know DB is never a problem with serssion timeout

add this to your web.config
<sessionState timeout="30" />

modify the following
<authentication mode="Forms">
       <forms name="MySite" loginUrl="Login.aspx" protection="All" />
</authentication>

remove Session.Timeout = 20 from global.asax and try again
0
 
LVL 1

Accepted Solution

by:
16spam16 earned 0 total points
ID: 22807300
i think i found my issue.

First, it isnt a session issue.
The reason no other site is having an issue is b/c they are all running unique Application Pools
I recall going in on the site in question, and changed the defaut values to like 1 min recycle on the Worker Process, thinking it would free up memory.  I never went back in and changed them back, b/c it doesnt really affect the memory that much with my app.  problem is i cant confirm this till monday, b/c i dont have access to that particular server remotely.  

Thanks.

I will confirm this monday morning.

Thank you.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question