Also i m sorry that i hv forgot to mention that the I hv to login into one website and using same login i hv to auto loign into the links of website given in the first website.So, as i m saving session in sql server when i try to logout from first website
it allows me but not from second website.
It is a senario of 'Single sign on for website in same domain'
Discussion26
Member
18 Points
25 Posts
Clear session from aspstate database on logout button click
Jan 21, 2013 06:54 AM|LINK
hi all,
In my asp.net3.5 web application
i hv set <sessionState mode="SQLServer" >.When i login with username-pwd,
it creates row dbo.ASPStateTempSessions for current session.
This row will automatically get deleted on timeout happens.
But want to delete the row when user clik on logout button.
Plz help me how can i do it.
thnx in advance.
SDS.ltd
graciax8
Participant
751 Points
210 Posts
Re: Clear session from aspstate database on logout button click
Jan 22, 2013 05:04 AM|LINK
Put this code in the logout button
To remove specific session variable
Session.Remove("Session_Variable_Name")To clear all session variables
mycodepad.blogspot.com || TUMBLR
Santosh Gada
Member
123 Points
23 Posts
Re: Clear session from aspstate database on logout button click
Jan 22, 2013 06:12 AM|LINK
Hi,
Please set slidingExpiration="true" in <Form slidingExpiration="true" > tag.
Thanks.
Santosh Gada
If it heps mark as answered
Discussion26
Member
18 Points
25 Posts
Re: Clear session from aspstate database on logout button click
Jan 22, 2013 06:33 AM|LINK
Thanx a lot both of you.
I tried but not helping me out.
Also i m sorry that i hv forgot to mention that the I hv to login into one website and using same login i hv to auto loign into the links of website given in the first website.So, as i m saving session in sql server when i try to logout from first website it allows me but not from second website.
It is a senario of 'Single sign on for website in same domain'
http://domain.com/website1
after loging into above link
I can automatically get loggedin into
http://domain.com/website2
hope u all understand the senario.
SDS.ltd
shwetamittal...
Member
12 Points
2 Posts
Re: Clear session from aspstate database on logout button click
Jan 24, 2013 12:33 PM|LINK
Hi,
you can try this
http://stackoverflow.com/questions/8806125/how-can-i-recycle-asp-net-sessions-stored-in-sql-server