.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Session management

Posted By: venu     Posted Date: July 29, 2011    Points:5   Category :ASP.Net
Hi Friends!

When the Session_End Event in Global.asax will fire and what we should do there.

Regards
---------
Venu

Responses
Author: Dhiraj Ranka             
Posted Date: July 29, 2011     Points: 20   

Hi,

In this event you can to the following
- release all the objects used in the web application
- kill the session
- close all the database connection objects
- redirect user to home page
- other application related housekeeping
etc


Hope this helps.

Thanks & Regards,
Dhiraj Ranka
http://www.twitter.com/dhirajranka | http://www.dhirajranka.com
Author: Arul             
Posted Date: July 29, 2011     Points: 20   

Hi,

Session_End Event will be fired once the session gets expired.

See this link for more info.

http://www.codeproject.com/KB/aspnet/ExploringSession.aspx

Thanks,
Arul

Author: Gowthammanju             
Posted Date: July 29, 2011     Points: 20   

try these as

Add a Global.asax file to your website, and in the Session_End event, you remove the user from your HashTable


protected void Session_End(Object sender, EventArgs e)
{
// Remove user from HashTable
}


Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Gowthammanju             
Posted Date: July 29, 2011     Points: 20   
Author: Gowthammanju             
Posted Date: July 29, 2011     Points: 20   

For detail step by step procedure try these link as


http://vishalnayan.wordpress.com/2011/03/06/looking-inside-global-asax-application-file-in-asp-net-3-5/

Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Gowthammanju             
Posted Date: July 29, 2011     Points: 20   

In web cofig try coding as

<forms name=".ASPXAUTH" loginUrl="~/Login.aspx"
defaultUrl="~/text.aspx" protection="All" timeout="45"
requireSSL="false">
</forms>
</authentication


Global.asax.cs file has

void Session_End(object sender, EventArgs e)
{
Response.Redirect("~/Timeout.aspx");
}



You can make a redirect after 45 minutes using just client script:

window.setTimeout(function() {
window.location.href = '/Timeout.aspx';
}, 1000*45*60);


Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Gowthammanju             
Posted Date: July 29, 2011     Points: 20   

try these as

http://www.vikramlakhotia.com/Mystries_of_when_does_Session_End_event_fires_in_AspNet.aspx

Thanks & Regards,
GowthamManju
Chennai



Mark if the answer is true
Author: Sasi Prabhu             
Posted Date: July 29, 2011     Points: 20   

Hi,

Use Global.asax.

Thanks & Regards,
Sasi Prabhu.
Author: kumar pavan             
Posted Date: July 31, 2011     Points: 20   

Server must be able to identify same user across multiple requests so it saves application state.

three ways to use session 1.Inproc 2.state server(out proc) 3.Sql server(database based)

1.Inproc here mode attribute is set to Inproc and Session ID used to identify session it is stored as cookie in browser.

Data associated with session and accessed through the session id stored on web server

2.state server set mode attribute to state server storing data in seperate in memory cahe controlled remote service
<sessionState mode="StateServer"
stateConnectionString="tcpip=myserver:42424" cookieless="false" timeout="20" />

3.session data stored in sqlserver db tables this is relieble one than others



Author: Ravi Ranjan Kumar             
Posted Date: July 31, 2011     Points: 20   

The session clock is reset to the session timeout value. if you close your browser,
the server does not know this. Consequently the Session_end event fires when the Session timeout value has been reached with no intervening page requests.
The given link might help you having question like "if I close the browser, is the Session_End event supposed to be fired right way? how that really fires"

http://www.eggheadcafe.com/community/aspnet/7/6947/sessionend.aspx

Thanks & Regards
Ravi Ranjan Kumar
http://raviranjankr.wordpress.com


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend