Solved

Session timeout isnt working....

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

695 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