Hi,
I am new to .net. I have created a small web application using .net 2.0 in
vs2005, where the user logs in and adds content on their pages. The content
editing is done by integrating a wysiwyg editor (FCKEditor).
The problem is that sometime if the user spends too much time editing the
content and presses the update button, the session gets timed out and the
users looses all what he has been doing. In the old days of classic ASP, i
used to increase the Session.Timeout value to a high number. But how to do
it in .NET? I would like to know some best practice example of keeping the
user session alive in .NET.
Any help is appriciated.
Tnx. 7 1542
Hi,
You can achieve changing the timeout value in "web.config" file.
You have to find the node beginning with "sessionState" under "<system.web>"
node and change the value of "timeout" attribute. The value you set here is
based on "minute"s. So if its value is "20" then your session timeout value
is 20 minutes.
--
All the best,
Coskun SUNALI
MVP ASP/ASP.NET http://sunali.com
"Jack" <no@sp.amwrote in message
news:ux******************@TK2MSFTNGP05.phx.gbl...
Hi,
I am new to .net. I have created a small web application using .net 2.0 in
vs2005, where the user logs in and adds content on their pages. The
content editing is done by integrating a wysiwyg editor (FCKEditor).
The problem is that sometime if the user spends too much time editing the
content and presses the update button, the session gets timed out and the
users looses all what he has been doing. In the old days of classic ASP, i
used to increase the Session.Timeout value to a high number. But how to do
it in .NET? I would like to know some best practice example of keeping the
user session alive in .NET.
Any help is appriciated.
Tnx.
"Jack" <no@sp.amwrote in message
news:ux******************@TK2MSFTNGP05.phx.gbl...
In the old days of classic ASP, I used to increase the Session.Timeout
value to a high number. But how to do it in .NET?
Same way: http://msdn2.microsoft.com/en-us/lib...ut(VS.80).aspx
I would like to know some best practice example of keeping the user
session alive in .NET.
Sessions time out for a reason, namely to reduce the amount of memory
overhead on the webserver. As the MSDN article below states, you should
really think very carefully before increasing the timeout value... http://msdn2.microsoft.com/en-us/library/ms525473.aspx
--
Mark Rae
ASP.NET MVP http://www.markrae.net
>I would like to know some best practice example of keeping the user session alive in .NET.
Sessions time out for a reason, namely to reduce the amount of memory
overhead on the webserver. As the MSDN article below states, you should
really think very carefully before increasing the timeout value... http://msdn2.microsoft.com/en-us/library/ms525473.aspx
I'll second that. IMO, the "best practice" for using sessions is to pass
data from one page to another on a redirect. If you need to persist data
longer than a couple of seconds, I'd put it in a DB.
Read my article on codeproject for easy solution http://www.codeproject.com/KB/aspnet...onForever.aspx
George.
"Jack" <no@sp.amwrote in message
news:ux******************@TK2MSFTNGP05.phx.gbl...
Hi,
I am new to .net. I have created a small web application using .net 2.0 in
vs2005, where the user logs in and adds content on their pages. The
content editing is done by integrating a wysiwyg editor (FCKEditor).
The problem is that sometime if the user spends too much time editing the
content and presses the update button, the session gets timed out and the
users looses all what he has been doing. In the old days of classic ASP, i
used to increase the Session.Timeout value to a high number. But how to do
it in .NET? I would like to know some best practice example of keeping the
user session alive in .NET.
Any help is appriciated.
Tnx.
Nice work-around, but you still can't control when the asp.net worker
process re-cycles. Especially in a shared host environment.
"George Ter-Saakov" <gt****@cardone.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Read my article on codeproject for easy solution http://www.codeproject.com/KB/aspnet...onForever.aspx
George.
"Jack" <no@sp.amwrote in message
news:ux******************@TK2MSFTNGP05.phx.gbl...
>Hi,
I am new to .net. I have created a small web application using .net 2.0 in vs2005, where the user logs in and adds content on their pages. The content editing is done by integrating a wysiwyg editor (FCKEditor).
The problem is that sometime if the user spends too much time editing the content and presses the update button, the session gets timed out and the users looses all what he has been doing. In the old days of classic ASP, i used to increase the Session.Timeout value to a high number. But how to do it in .NET? I would like to know some best practice example of keeping the user session alive in .NET.
Any help is appriciated.
Tnx.
Ideally it should never recycle.
If you have a browser hitting the SessionRenew.aspx every 10 minutes then it
will not recycle due to inactivity.
If it recycles just because someone spiked CPU and hoster had to hit reset
button in shared hosting environment you doomed no matter what you do :)
But then if availability that important to you time to think about dedicated
server.
George.
"Scott Roberts" <sr******@no.spam.here-webworks-software.comwrote in
message news:%2***************@TK2MSFTNGP06.phx.gbl...
Nice work-around, but you still can't control when the asp.net worker
process re-cycles. Especially in a shared host environment.
"George Ter-Saakov" <gt****@cardone.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>Read my article on codeproject for easy solution http://www.codeproject.com/KB/aspnet...onForever.aspx
George.
"Jack" <no@sp.amwrote in message news:ux******************@TK2MSFTNGP05.phx.gbl. ..
>>Hi,
I am new to .net. I have created a small web application using .net 2.0 in vs2005, where the user logs in and adds content on their pages. The content editing is done by integrating a wysiwyg editor (FCKEditor).
The problem is that sometime if the user spends too much time editing the content and presses the update button, the session gets timed out and the users looses all what he has been doing. In the old days of classic ASP, i used to increase the Session.Timeout value to a high number. But how to do it in .NET? I would like to know some best practice example of keeping the user session alive in .NET.
Any help is appriciated.
Tnx.
Ideally it should never recycle.
It does.
If you have a browser hitting the SessionRenew.aspx every 10 minutes then
it will not recycle due to inactivity.
Probably due to memory - from other hacks stuffing too much crap in their
session variables.
If it recycles just because someone spiked CPU and hoster had to hit reset
button in shared hosting environment you doomed no matter what you do :)
Indeed.
But then if availability that important to you time to think about
dedicated server.
Or not use sessions. :) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Damien |
last post by:
Hi to all,
I'm currently re-designing our intranet : nice and lean CSS2, cleaned-up
PHP 4.3.7, better-normalized MySQL ;o). So I've started using the
$_SESSION variable instead of register_globals...
|
by: mudge |
last post by:
I'm running PHP Version 4.3.10. I'm trying to make it so that when a
person logs in using a user name and password that their session is
valid and continues for a few months so they don't have to...
|
by: Al Jones |
last post by:
This is a repost form the vbscript newgroup - if this isn't the appropriate
group would you point me toward one that is.
Basically, I seem to be losing session data part way though preparing an...
|
by: Abhilash.k.m |
last post by:
This is regarding the session management using Out of
proc session management(SQL SERVER). Among the samples
below which one is better to set the session?
1. There are 20 session...
|
by: joseph conrad |
last post by:
Hi,
I tried to implement my own session handler in order to keep control on
the process
the drawback I foun it is not creating and storing in my cookie the
PHPSESSID variable anymore.
reading te...
| |
by: aroraamit81 |
last post by:
Hi,
I am facing a trouble. I have some Session variables in my code and
somehow my session variables are getting mixed up with other users.
For example User A has access to 10 companies and...
|
by: aroraamit81 |
last post by:
Well Guys, Here is a very strange trouble. When more than one users
request tto same page at the same time then our session gets
conflicted.
Moreover I printed my SessionID, strangely but true I...
|
by: TRB_NV |
last post by:
I'd been using an Access database based shopping cart, but wanted to change
it so that it would use session variables. I have a form that's submitted
to a page called addtocart.asp that contains...
|
by: Santosh |
last post by:
Dear All
i am writting a code sending mail with attachement.
i am writting code for sending mail in one page and code for attaching
a file in the next page.
aftet attaching a file i am taking...
|
by: lyealain |
last post by:
<%
If Session("username") = "" Then
Response.Redirect("/CLS/Login.asp")
End If
Dim conn
Dim connectstr
Dim db_name, db_username, db_userpassword
Dim db_server
Dim res
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
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...
|
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...
|
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...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |