473,763 Members | 7,611 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session Expires very quickly

106 New Member
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 5434
kunal pawar
297 Contributor
check your we.config file
Mar 17 '09 #2
Hamayun Khan
106 New Member
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 Contributor
But there is setting related to session time out in web.config
Mar 17 '09 #4
Hamayun Khan
106 New Member
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 New Member
Also The Site is working fine locally when I run it from visual Studio
Mar 17 '09 #6
Hamayun Khan
106 New Member
@kunal pawar
I add the following to web.config file.

<sessionState cookieless="Use Cookies" 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
bhupinder
32 New Member
@Hamayun Khan


<sessionState cookieless="Use Cookies" timeout="180"> </sessionState>
Mar 20 '09 #8
Frinavale
9,735 Recognized Expert Moderator Expert
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....especia lly 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
1764
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 the client, my session expires as soon as i login to the application. This works fine on another machine. Do any one have idea about this Thanks in advance
3
1900
by: Welman Jordan | last post by:
Hello all, In Session_OnStart, I set a session variable: Session = DateTime.Now; and Session.Timeout = 15;
12
6994
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
1891
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 appreciated.
3
1101
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 possible reasons for such a problem? thanks, gomzi.
2
1741
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 in MVS2005) but when i posted on the server it's not working ... For example in a page i have to do the following: If (Session("email") <> "") Then temail.Text = Session("email") re = cust.GetCustomerName(temail.Text) Else
3
1547
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 session life in IIS morethan 20 mins and while setting session in Login page i have set 20000,100000 for timing. but also i could not rectify this problem, Pls guys help me out .................
2
1016
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 code behind. I have done my project using C# and asp.net Can anyone please help me out regards cmrhema
4
2026
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, " + Session.ToString(); I want that when the session expires either user will see LogIn page or the sesion resume their values. Where i write the code for the above.... thanks for your code in advance
0
10148
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9823
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8822
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6643
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3528
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2794
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.