Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / December 2007

Tip: Looking for answers? Try searching our database.

ASP.NET Session management from External Application

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
amit_mitra - 27 Dec 2007 07:51 GMT
I Need to forcefully Abandon ASP.NET sessions from an external Windows
application or another site. Please help how can i implement this
Mark Rae [MVP] - 27 Dec 2007 07:57 GMT
> 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...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

amit_mitra - 27 Dec 2007 08:09 GMT
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

> > I need to forcefully abandon ASP.NET sessions from an external Windows
> > application or another site.
[quoted text clipped - 3 lines]
> 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 [MVP] - 27 Dec 2007 08:18 GMT
>> > I need to forcefully abandon ASP.NET sessions from an external Windows
>> > application or another site.
[quoted text clipped - 13 lines]
> 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...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Michael Nemtsev [MVP] - 27 Dec 2007 09:40 GMT
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" <amitmitra@discussions.microsoft.com> wrote in message
M> news:B8A1C50B-6995-4C38-B1BA-F29C1E6E0D0E@microsoft.com...
M>

>>>> I need to forcefully abandon ASP.NET sessions from an external
>>>> Windows application or another site.
[quoted text clipped - 16 lines]
>> 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>
Mark Rae [MVP] - 27 Dec 2007 11:43 GMT
> 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...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

amit_mitra - 27 Dec 2007 12:10 GMT
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

> > I suppose he needs to use standard SQL job
> > "State_Job_DeleteExpiredSessions" clear the sessions
[quoted text clipped - 3 lines]
> He doesn't want to clear expired sessions - he wants to forcibly terminate
> current sessions...
Michael Nemtsev [MVP] - 27 Dec 2007 12:33 GMT
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>
Eliyahu Goldin - 27 Dec 2007 12:54 GMT
What is your ultimate purpose? May be there are more elegant solutions to it
than killing sessions.

Signature

Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net

> In addition to this My site works with MYSQL and Oracle. I amm looking for
> a
[quoted text clipped - 13 lines]
>> terminate
>> current sessions...
amit_mitra - 27 Dec 2007 16:38 GMT
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.

> What is your ultimate purpose? May be there are more elegant solutions to it
> than killing sessions.
[quoted text clipped - 16 lines]
> >> terminate
> >> current sessions...
Coskun SUNALI [MVP] - 27 Dec 2007 18:09 GMT
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.

Signature

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

> 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.
[quoted text clipped - 26 lines]
>> >> terminate
>> >> current sessions...
Coskun SUNALI [MVP] - 27 Dec 2007 12:51 GMT
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.

Signature

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

>I Need to forcefully Abandon ASP.NET sessions from an external Windows
> application or another site. Please help how can i implement this
dev - 27 Dec 2007 21:33 GMT
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
Michael Nemtsev [MVP] - 27 Dec 2007 22:01 GMT
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 <amitmi...@discussions.microsoft.com>
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.