473,385 Members | 1,379 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,385 software developers and data experts.

Session Expires very quickly

106 100+
Hi all

I have developed Website in asp.net. The site was working fine for more than 6 months. Now from 3 to 4 days I m facing a problem. When I login as Admin to Administrator and create Session for the administrator. The Session expires in less than a minute. I don't know why i m facing this problem. I m sure that I did nothing to code that cause this problem.

Any Help in this issue.

Thanks in Advance.
Mar 17 '09 #1
8 5399
kunal pawar
297 100+
check your we.config file
Mar 17 '09 #2
Hamayun Khan
106 100+
Thanks for ur quick reply

I did nothing for sessiontimeout in web.config file. I want the session to keep live for only 20 minutes.
Mar 17 '09 #3
kunal pawar
297 100+
But there is setting related to session time out in web.config
Mar 17 '09 #4
Hamayun Khan
106 100+
Please look into my web.config file.
Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0"?>
  2. <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
  3.   <configSections>
  4.     <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
  5.       <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
  6.         <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
  7.         <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
  8.           <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
  9.           <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
  10.           <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
  11.         </sectionGroup>
  12.       </sectionGroup>
  13.     </sectionGroup>
  14.     <section name="rewriter" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter"/>
  15.   </configSections>
  16.  
  17.   <connectionStrings>
  18.     <add name="dbase_DataConnectionString6" connectionString="Data Source=tcp:xxxxx;Initial Catalog=xxxx;User ID=xxx;Password=xxx;Connection Timeout=120;" providerName="System.Data.SqlClient"/>    
  19.   </connectionStrings>
  20.     <system.web>
  21.     <pages validateRequest="false" enableEventValidation="false" viewStateEncryptionMode ="Never" >
  22.       <controls>
  23.         <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  24.         <add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>
  25.       </controls>
  26.     </pages>
  27.     <customErrors defaultRedirect="~/ErrorInfo.aspx"/>
  28.     <httpHandlers>
  29.       <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/>
  30.       <remove verb="*" path="*.asmx"/>
  31.       <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  32.       <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  33.       <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
  34.     </httpHandlers>
  35.     <authentication mode="Windows"/>
  36.     <httpModules>
  37.       <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter"/>
  38.       <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  39.     </httpModules>
  40.     <compilation debug="true">
  41.       <buildProviders>
  42.         <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
  43.       </buildProviders>
  44.       <assemblies>
  45.         <add assembly="Accessibility, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
  46.         <add assembly="Microsoft.SqlServer.ConnectionInfo, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
  47.         <add assembly="Microsoft.SqlServer.Smo, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
  48.         <add assembly="Microsoft.SqlServer.SmoEnum, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
  49.         <add assembly="Microsoft.SqlServer.SqlEnum, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
  50.         <add assembly="Microsoft.Vsa.Vb.CodeDOMProcessor, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
  51.         <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
  52.         <add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
  53.         <add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
  54.         <add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
  55.         <add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
  56.         <add assembly="System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
  57.         <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  58.         <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
  59.         <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
  60.         <add assembly="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
  61.       </assemblies>
  62.     </compilation>
  63.   </system.web>
  64.   <system.web.extensions>
  65.     <scripting>
  66.       <webServices>       
  67.       </webServices>      
  68.     </scripting>
  69.   </system.web.extensions>
  70.   <system.webServer>
  71.     <validation validateIntegratedModeConfiguration="false"/>
  72.     <modules>
  73.       <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  74.     </modules>
  75.     <handlers>
  76.       <remove name="WebServiceHandlerFactory-Integrated"/>
  77.       <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  78.       <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  79.       <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  80.     </handlers>
  81.   </system.webServer>
  82.  
  83.     <rewriter>
  84.  
  85.     <rewrite url="home/(.+)" to="~/$1.aspx"/>
  86.  
  87.   </rewriter>
  88. </configuration>
Mar 17 '09 #5
Hamayun Khan
106 100+
Also The Site is working fine locally when I run it from visual Studio
Mar 17 '09 #6
Hamayun Khan
106 100+
@kunal pawar
I add the following to web.config file.

<sessionState cookieless="UseCookies" timeout="60"> </sessionState>

Before I add this line session expires within minute. Now session remain live for 4 to five minutes when I leave the page inactive.
Mar 17 '09 #7
@Hamayun Khan


<sessionState cookieless="UseCookies" timeout="180"> </sessionState>
Mar 20 '09 #8
Frinavale
9,735 Expert Mod 8TB
Sometimes Cookieless Sessions are not acceptable, especially in websites that require authentication....like this case.

My assumption would be that your worker process is getting recycled because it is growing too large.

If this is the case, then not only will the administrator's session expire, all users using the system will have their sessions expire at the same time.

Make sure that all processes that use resources (like database connections, files access, etc) are cleaned up when they are no longer being used....especially with regards to administrator features.

-Frinny
Mar 20 '09 #9

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

Similar topics

2
by: Rahul Kansara | last post by:
Hi e'body, I have an application developed in ASP.Net and have installed on iis server. The problem i am encountering is when I try to access the application through Internet explorer from one of...
3
by: Welman Jordan | last post by:
Hello all, In Session_OnStart, I set a session variable: Session = DateTime.Now; and Session.Timeout = 15;
12
by: ACaunter | last post by:
Hi all, I was wondering how i could write some code which would automatically open the Login Page once the session has expired? -- AdamPC@hotmail.com
2
by: chamaratharanga | last post by:
I have set the session timeout as 120 mins in the Global.asax. However my session expires within about 5-10 mins at different pages. I used "InProc" as the session state mode. Any help is...
3
by: gomzi | last post by:
hi, I am storing values using the session object(asp.net 2.0). The problem i am facing is that the session expires suddenly for no apparent reason. Could anyone tell me as to what may be the...
2
by: maha el ghoul | last post by:
Hello Guys, am a new member..and am new to asp.net..Am using VB.net 2.0,my website uses a unique application pool.The session used to work just fine when i was testing my website on localhost (browse...
3
by: shiyazahammed | last post by:
Hi techies, In my asp.net 2.0 website , after login, within 5 mins session expires , I am doing all the actions according to UserName,ID,Privileges all are stored in Session since login.I have set...
2
by: cmrhema | last post by:
hello I have a project wherein I am calling all pages using session. When a session expires I want a page to be displayed. I want this to be done in web.config file or global.asax and not through...
4
by: agarwalsunitadhn | last post by:
my problem is that after every 20minutes i got the error that the Object reference not set to an instance of an object. and highlight the line lblWelcome.Text = "Welcome, " +...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.