Solved

Session timeout isnt working....

Posted on 2008-10-24
5
257 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
  • 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

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…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

867 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now