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

Session Object Clear-up

I saved Socket Objects in Session to enhance the performance in my ASP.NET app. I have two questions.

1) Does ASP.NET Logon expire the same moment as Session Expire? I use Form Authentication in my ASP.NET Application.

2) I want to Close/Shutdown all socket objects at Session_End() in Global.asax, because I think the ASP.NET may not close it properly. The question is: How could I know if a session object type is Socket? I may use more than one socket, and I could not know how many sockets I used in Session_End() subroutine.

Thanks.
Nov 18 '05 #1
1 1280
Hi,

1) They are separate from each other. Session has its own timeout setting
and Forms Authentication has its own. You can tweak them to be as close each
other as possible and try to expire the other when other ends (you could
also check in global.asax for conditions when one has expired)

2) Perhaps you should store sockets in a custom collection or something that
you store into certain location. Then you could iterate through the
collection, and therefore always iterate through all sockets (just wondering
if they exist anymore when Session_End is called).

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

"Mike Z." <an*******@discussions.microsoft.com> wrote in message
news:29**********************************@microsof t.com...
I saved Socket Objects in Session to enhance the performance in my ASP.NET
app. I have two questions.

1) Does ASP.NET Logon expire the same moment as Session Expire? I use Form
Authentication in my ASP.NET Application.

2) I want to Close/Shutdown all socket objects at Session_End() in
Global.asax, because I think the ASP.NET may not close it properly. The
question is: How could I know if a session object type is Socket? I may use
more than one socket, and I could not know how many sockets I used in
Session_End() subroutine.

Thanks.
Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: itsme | last post by:
Hello, I am storing an XmlDocument into the session. Each time I want to store the XmlDocument into session, I should clear the session object and then store the XmlDocument. Can anyone...
3
by: catweezle2010 | last post by:
Hello NG, I have three files (default.aspx, search.aspx and work.aspx). The way is: login on default (if session is newsession). The loginname I write into as sessionvariable (username). So I...
4
by: Alex D. | last post by:
Hi. I have a TreeView stored in a session variable...is ok...problem is when I use Nodes.Clear() then my session variable that holds the TreeView is also emptied! Is this behavior by design or...
11
by: rayala | last post by:
Hi all, I am having very weird problem in my Outlook I am running my web application from with in Outlook.I found a strange problem that it is creating different sessionId if i open a new...
14
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...
2
by: Krishna | last post by:
hi, I am anand.I used session state object in some pages in my application ex Session("UserId"). some times applications displayed the following error Object reference not set to an instance...
3
by: ricardo.sobral.santos | last post by:
Hi there, I cannot store an arraylist in a session. I have read some posts and still found no solution. I am sure it might be something simple, but since I have been around it for quite sometime...
2
by: Nathan Sokalski | last post by:
I have an application that is using Session state. On one page, I use the Session.Add() method to create the Key/Value pair for the first time. I am then sent to another page using...
5
by: jamie.jamazon | last post by:
I'm currently developing a small MVC framework using classic ASP (don't ask me why!) At it's core it calls the controller script which does the heavy logic and builds disconnected recordsets of the...
16
by: Jonathan Wood | last post by:
Greetings, I was wondering if anyone here has a good understaning of the Session object. I know there are options like the Session.Abandon method and the regenerateExpiredSessionId setting,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
jinu1996
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 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.