ASP.NET Session management from External Application
am 27.12.2007 08:51:01 von amitmitraI Need to forcefully Abandon ASP.NET sessions from an external Windows
application or another site. Please help how can i implement this
I Need to forcefully Abandon ASP.NET sessions from an external Windows
application or another site. Please help how can i implement this
"amit_mitra"
news:DBBB587B-575B-4D32-A1FA-8DA68C4FCC1A@microsoft.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
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"
> news:DBBB587B-575B-4D32-A1FA-8DA68C4FCC1A@microsoft.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
>
>
"amit_mitra"
news:B8A1C50B-6995-4C38-B1BA-F29C1E6E0D0E@microsoft.com...
>> "amit_mitra"
>> news:DBBB587B-575B-4D32-A1FA-8DA68C4FCC1A@microsoft.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
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"
M> news:B8A1C50B-6995-4C38-B1BA-F29C1E6E0D0E@microsoft.com...
M>
>>> "amit_mitra"
>>> news:DBBB587B-575B-4D32-A1FA-8DA68C4FCC1A@microsoft.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).
M> Hmm - that's a valid point - I hadn't considered anything other than
M> inproc sessions.
M>
M> If you use SQL Server to manage sessions, then in theory you could
M> delete the individual session records from the database. I have never
M> tried this, and am not sure if this would leave your web app in an
M> unstable state...
M>
"Michael Nemtsev [MVP]"
news:3d9fba1a2226a8ca16dfe27013d0@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
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]"
> news:3d9fba1a2226a8ca16dfe27013d0@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
>
>
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
a> In addition to this My site works with MYSQL and Oracle. I amm
a> looking for a solution with ASP.NET State services. If we can find
a> out the API exposed by this state service for updation of session
a> state data, I think we can find some solutions.
a>
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"
news:DBBB587B-575B-4D32-A1FA-8DA68C4FCC1A@microsoft.com...
>I Need to forcefully Abandon ASP.NET sessions from an external Windows
> application or another site. Please help how can i implement this
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"
news:AA46A68D-CE27-4F30-A48A-EBEDA86503F2@microsoft.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]"
>> news:3d9fba1a2226a8ca16dfe27013d0@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
>>
>>
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"
> news:AA46A68D-CE27-4F30-A48A-EBEDA86503F2@microsoft.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]"
> >> news:3d9fba1a2226a8ca16dfe27013d0@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
> >>
> >>
>
>
>
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"
news:BE3374AA-38B4-4034-95EC-452BA73BC4F2@microsoft.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"
>> news:AA46A68D-CE27-4F30-A48A-EBEDA86503F2@microsoft.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]"
>> >> news:3d9fba1a2226a8ca16dfe27013d0@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
>> >>
>> >>
>>
>>
>>
On Dec 27, 2:51 am, amit_mitra
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
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
d> On Dec 27, 2:51 am, amit_mitra
d> wrote:
d>
>> I Need to forcefully Abandon ASP.NET sessions from an external
>> Windows application or another site. Please help how can i implement
>> this
>>
d> Hi,
d>
d> If you are maintaining out of process session in a database. Then we
d> could try deleting that session from the database. We should give it
d> a try.
d>
d> Let me know your findings.
d>
d> Thanks
d> NET