473,405 Members | 2,373 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,405 software developers and data experts.

ASP.NET Session management from External Application

I Need to forcefully Abandon ASP.NET sessions from an external Windows
application or another site. Please help how can i implement this
Dec 27 '07 #1
13 1804
"amit_mitra" <am*******@discussions.microsoft.comwrote in message
news:DB**********************************@microsof t.com...
I need to forcefully abandon ASP.NET sessions from an external Windows
application or another site.
I don't believe this is possible for individual sessions.

You could abandon all sessions by forcing your web app to recycle. There are
several ways to do this, e.g. by opening and saving its web.config...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Dec 27 '07 #2
Hi Mark

I Totally aggreee with your statement. But with my recent findings I
came to know that ASP.NET can maintain the session states in a defferent
process using a state service or to a SQLServer.

If the website can communicate to that service for updating the sessions
data , why cant we ,using some external apps do that (including abonding the
sessions).

May be I am persuing it in the wrong way. Please correct me .

Regards, Amit
"Mark Rae [MVP]" wrote:
"amit_mitra" <am*******@discussions.microsoft.comwrote in message
news:DB**********************************@microsof t.com...
I need to forcefully abandon ASP.NET sessions from an external Windows
application or another site.

I don't believe this is possible for individual sessions.

You could abandon all sessions by forcing your web app to recycle. There are
several ways to do this, e.g. by opening and saving its web.config...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Dec 27 '07 #3
"amit_mitra" <am*******@discussions.microsoft.comwrote in message
news:B8**********************************@microsof t.com...
>"amit_mitra" <am*******@discussions.microsoft.comwrote in message
news:DB**********************************@microso ft.com...
I need to forcefully abandon ASP.NET sessions from an external Windows
application or another site.

I don't believe this is possible for individual sessions.

You could abandon all sessions by forcing your web app to recycle. There
are
several ways to do this, e.g. by opening and saving its web.config...

I Totally agree with your statement. But with my recent findings I
came to know that ASP.NET can maintain the session states in a different
process using a state service or to a SQLServer.

If the website can communicate to that service for updating the sessions
data , why cant we ,using some external apps do that (including abandoning
the
sessions).
Hmm - that's a valid point - I hadn't considered anything other than inproc
sessions.

If you use SQL Server to manage sessions, then in theory you could delete
the individual session records from the database. I have never tried this,
and am not sure if this would leave your web app in an unstable state...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Dec 27 '07 #4
Hello Mark Rae [MVP],

I suppose he need to use standard SQL job "State_Job_DeleteExpiredSessions"
clear the sessions

but he need either to create the similiar SP to clear ALL session or mark
then exprired and call this JOB

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
M"amit_mitra" <am*******@discussions.microsoft.comwrote in message
Mnews:B8**********************************@microso ft.com...
M>
>>"amit_mitra" <am*******@discussions.microsoft.comwrote in message
news:DB**********************************@micros oft.com...

I need to forcefully abandon ASP.NET sessions from an external
Windows application or another site.

I don't believe this is possible for individual sessions.

You could abandon all sessions by forcing your web app to recycle.
There
are
several ways to do this, e.g. by opening and saving its
web.config...
I Totally agree with your statement. But with my recent findings I
came to know that ASP.NET can maintain the session states in a
different
process using a state service or to a SQLServer.
If the website can communicate to that service for updating the
sessions
data , why cant we ,using some external apps do that (including
abandoning
the
sessions).
MHmm - that's a valid point - I hadn't considered anything other than
Minproc sessions.
M>
MIf you use SQL Server to manage sessions, then in theory you could
Mdelete the individual session records from the database. I have never
Mtried this, and am not sure if this would leave your web app in an
Munstable state...
M>
Dec 27 '07 #5
"Michael Nemtsev [MVP]" <ne*****@msn.comwrote in message
news:3d**************************@msnews.microsoft .com...
I suppose he needs to use standard SQL job
"State_Job_DeleteExpiredSessions" clear the sessions
Ah no, and that's the problem...

He doesn't want to clear expired sessions - he wants to forcibly terminate
current sessions...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Dec 27 '07 #6
In addition to this My site works with MYSQL and Oracle. I amm looking for a
solution with ASP.NET State services.

If we can find out the API exposed by this state service for updation of
session state data, I think we can find some solutions.

Amit

"Mark Rae [MVP]" wrote:
"Michael Nemtsev [MVP]" <ne*****@msn.comwrote in message
news:3d**************************@msnews.microsoft .com...
I suppose he needs to use standard SQL job
"State_Job_DeleteExpiredSessions" clear the sessions

Ah no, and that's the problem...

He doesn't want to clear expired sessions - he wants to forcibly terminate
current sessions...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Dec 27 '07 #7
Hello amit_mitra,

I suppose there is no API to terminate session outside the asp.net

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
aIn addition to this My site works with MYSQL and Oracle. I amm
alooking for a solution with ASP.NET State services. If we can find
aout the API exposed by this state service for updation of session
astate data, I think we can find some solutions.
a>
Dec 27 '07 #8
Hi,

If both applications - web and other - can access the same database -
directly or via a WebService; you can use a basic table to store which
users' session you want to abandon and during the page loads, you can check
this table to see if you have to abandon current user's session state. And
abandon the state if the user's name is in the table and delete the row from
the table.

May sound like a workaround but looks like the most simple one.

I would also like to hear if there are some other ways to do this - not
recycling the application pool or something like that but removing the
session information for a single user.

--
All the best,
Coskun SUNALI
MVP ASP/ASP.NET
http://sunali.com

"amit_mitra" <am*******@discussions.microsoft.comwrote in message
news:DB**********************************@microsof t.com...
>I Need to forcefully Abandon ASP.NET sessions from an external Windows
application or another site. Please help how can i implement this
Dec 27 '07 #9
What is your ultimate purpose? May be there are more elegant solutions to it
than killing sessions.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"amit_mitra" <am*******@discussions.microsoft.comwrote in message
news:AA**********************************@microsof t.com...
In addition to this My site works with MYSQL and Oracle. I amm looking for
a
solution with ASP.NET State services.

If we can find out the API exposed by this state service for updation of
session state data, I think we can find some solutions.

Amit

"Mark Rae [MVP]" wrote:
>"Michael Nemtsev [MVP]" <ne*****@msn.comwrote in message
news:3d**************************@msnews.microsof t.com...
I suppose he needs to use standard SQL job
"State_Job_DeleteExpiredSessions" clear the sessions

Ah no, and that's the problem...

He doesn't want to clear expired sessions - he wants to forcibly
terminate
current sessions...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net


Dec 27 '07 #10
The Challenge is that I need to provide a window based monitoring tool for
Admininstrators to view and terminate the live sessions of the website.

The database solution provided by Coskun SUNALI is OK but it involves a
turnaround trip to database with each HTT request for checking its life
status.
"Eliyahu Goldin" wrote:
What is your ultimate purpose? May be there are more elegant solutions to it
than killing sessions.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"amit_mitra" <am*******@discussions.microsoft.comwrote in message
news:AA**********************************@microsof t.com...
In addition to this My site works with MYSQL and Oracle. I amm looking for
a
solution with ASP.NET State services.

If we can find out the API exposed by this state service for updation of
session state data, I think we can find some solutions.

Amit

"Mark Rae [MVP]" wrote:
"Michael Nemtsev [MVP]" <ne*****@msn.comwrote in message
news:3d**************************@msnews.microsoft .com...

I suppose he needs to use standard SQL job
"State_Job_DeleteExpiredSessions" clear the sessions

Ah no, and that's the problem...

He doesn't want to clear expired sessions - he wants to forcibly
terminate
current sessions...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net



Dec 27 '07 #11
Hi,

Performance issues of course can be discussed but I was just trying to find
a solution as simple as possible.

If there is something I may help you further, please don't hesitate to ask.

--
All the best,
Coskun SUNALI
MVP ASP/ASP.NET
http://sunali.com
http://www.propeople.dk

"amit_mitra" <am*******@discussions.microsoft.comwrote in message
news:BE**********************************@microsof t.com...
The Challenge is that I need to provide a window based monitoring tool for
Admininstrators to view and terminate the live sessions of the website.

The database solution provided by Coskun SUNALI is OK but it involves a
turnaround trip to database with each HTT request for checking its life
status.
"Eliyahu Goldin" wrote:
>What is your ultimate purpose? May be there are more elegant solutions to
it
than killing sessions.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"amit_mitra" <am*******@discussions.microsoft.comwrote in message
news:AA**********************************@microso ft.com...
In addition to this My site works with MYSQL and Oracle. I amm looking
for
a
solution with ASP.NET State services.

If we can find out the API exposed by this state service for updation
of
session state data, I think we can find some solutions.

Amit

"Mark Rae [MVP]" wrote:

"Michael Nemtsev [MVP]" <ne*****@msn.comwrote in message
news:3d**************************@msnews.microsof t.com...

I suppose he needs to use standard SQL job
"State_Job_DeleteExpiredSessions" clear the sessions

Ah no, and that's the problem...

He doesn't want to clear expired sessions - he wants to forcibly
terminate
current sessions...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net



Dec 27 '07 #12
dev
On Dec 27, 2:51 am, amit_mitra <amitmi...@discussions.microsoft.com>
wrote:
I Need to forcefully Abandon ASP.NET sessions from an external Windows
application or another site. Please help how can i implement this
Hi,

If you are maintaining out of process session in a database. Then we
could try deleting that session from the database. We should give it a
try.

Let me know your findings.

Thanks
NET
Dec 27 '07 #13
Hello dev,

it would be cool if u read all thread :) because we already discussed this
option - OP wants to store the session, but just terminate (NOT DELETE) them
at specific period of time

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
dOn Dec 27, 2:51 am, amit_mitra <amitmi...@discussions.microsoft.com>
dwrote:
d>
>I Need to forcefully Abandon ASP.NET sessions from an external
Windows application or another site. Please help how can i implement
this
dHi,
d>
dIf you are maintaining out of process session in a database. Then we
dcould try deleting that session from the database. We should give it
da try.
d>
dLet me know your findings.
d>
dThanks
dNET
Dec 27 '07 #14

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

Similar topics

27
by: mrbog | last post by:
Tell me if my assertion is wrong here: The only way to prevent session hijacking is to NEVER store authentication information (such as name/password) in the session. Well, to never authenticate...
5
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...
1
by: Chris | last post by:
1.) I have a web app that will be primarilary used by internal (internal network resources) users, approx. 40-50 at any one time, then there will be external (external coming into the internal...
4
by: Danny W | last post by:
Hi There! Is it possible to use HttpModule to replace the built-in ASP.NET Session object? I want to write a HttpModule that will handle storing and retrieving of session values from an external...
1
by: ML | last post by:
Hi NG! I wish to use SQLserver sessionstate mode with my ASP.NET application, since reliability is a big issue and performance less so. However, it is hosted at an external hosting partner who...
6
by: Eric McVicker | last post by:
Session state has options to be inproc, state server or sql server. Why does Application state not allow for state server or sql server so the same Application state could be shared between...
2
by: ras26 | last post by:
I have a WebSite "App1" which has an external assembly "Lib1". Inside this external assembly we have developed some classes that derive from "System.Web.UI.Page". One of these pages is called...
18
by: BillE | last post by:
When a user opens a new IE browser window using File-New-Window the integrity of an application which relies on session state is COMPLETELY undermined. Anyone who overlooks the fact that...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.