Can we change the session timeout in ASP.NET, if yes then
how and from where?

Answers were Sorted based on User's Feedback



Can we change the session timeout in ASP.NET, if yes then how and from where?..

Answer / narinder mahindru

By default session time out is 20 minutes but one can
change it. there are two ways to change the sessiontime out
in asp.net that is:-


1) from web config. file by setting the session timot
element eg.
<sessionstate timeout="60"/>

or
2) by doing programtically eg.
session.timeout=60

Is This Answer Correct ?    21 Yes 3 No

Can we change the session timeout in ASP.NET, if yes then how and from where?..

Answer / sabeer pasha

Hi All,

Have u set any time limit in the web.config file if not
then set like this
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>

Is This Answer Correct ?    15 Yes 4 No

Can we change the session timeout in ASP.NET, if yes then how and from where?..

Answer / narendra

to change session timeout write this code in your web.config
file

<sessionState mode="InProc" timeout="60">

it will increase your session expire time .

Is This Answer Correct ?    12 Yes 3 No

Can we change the session timeout in ASP.NET, if yes then how and from where?..

Answer / narendra soni

to change session timeout write this code in your web.config
file

<sessionState mode="InProc" timeout="60">

or you can also set this in global.asax file as

Session.Timeout = 60 ; // in Session.Start() event

it will increase your session expire time .

Is This Answer Correct ?    11 Yes 4 No

Can we change the session timeout in ASP.NET, if yes then how and from where?..

Answer / guest

yes go to change webconfig session timeout.

Is This Answer Correct ?    7 Yes 1 No

Can we change the session timeout in ASP.NET, if yes then how and from where?..

Answer / saminathan

The session in my application often gets expired.

I've tried giving session timings both
in the page directive of the page
as well as

Is This Answer Correct ?    6 Yes 3 No

Can we change the session timeout in ASP.NET, if yes then how and from where?..

Answer / mohammad aziz

Yes ofcourse. There are few steps which needs to be
followed. Pls. visit this link to have a beautiful
explaination...
http://support.yessoftware.com/kb_article.asp?
s_keyword=.gif&s_prod=&kb_articlesPageSize=10&s_type=&order_
by=Freshness&s_cat=&article_id=74


Aziz...

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More ASP.NET Interview Questions

How do you pass session values from one page to another ?

4 Answers   Digital GlobalSoft,


How we implement the multiple paypal value with gridview in my website and how we make a payment through Credit Card.

0 Answers  


How to implement globalization and localization in the use interface in .net.

0 Answers  


What does asp stand for in asp.net?

0 Answers  


What are the asp.net list controls and difference between them?

0 Answers  






What is a transaction? a) A banking term. b) A concept used to describe a step in the business process. c) A combination of DML steps that must succeed or the data is retuned to its initial state. d) A combination of DDL steps that must succeed or the data is retuned to its initial state.

5 Answers   Syntax Softtech,


What’s difference between “optimistic” and “pessimistic” locking?

0 Answers  


What asp.net control can embed xaml into asp.net pages?

0 Answers  


cr8 2 datatables into one dataset DYNAMICALLY (no backend database used like sql,etc.,) with following columns 1st datatable with columns studentNo studentName Deptno 2nd datatable with columns Deptno DeptName DeptAddress add data to both the tables Dynamically and merge these tables into one table and display it in Grid view as studentNo studentName Deptno DeptName DeptAddress

1 Answers   SQL Star,


What events will occur when a page is loaded?

0 Answers  


What layout mode is the default when a new Web Form is created? a) GridBagLayout b) GridLayout c) FlowLayout d) FormLayout

2 Answers   Syntax Softtech,


Define a multilingual website?

0 Answers  


Categories