Forum  General Visual ...  How do I...?  Help on session logout
Previous Previous
 
Next Next
New Post 3/23/2009 12:26 PM
  jasb
275 posts
4th Level Poster


Help on session logout 

People,

Two help's.

I want to destroy the session and close the browser, two situations:

1-Menu "logout" on mainmenu, destroying session with: "Me.Session.IsLoggedOn = False", and want to close the browser, how to do it?

2-Want to destroy the session with the abobe code when the user closes the browser, i've tryed on form.closing() but nothing, where can i do it?

A third question, to destroy the session, the correct was is how i am doing with "Me.Session.IsLoggedOn = False" ?

Jorge,

 
New Post 3/23/2009 3:18 PM
  jayhobbs
1644 posts
1st Level Poster




Re: Help on session logout 

Hi,

Context.Session.IsLoggedOn = False will destroy the session and will reopen the login form if it is being used.

If you are not using a Login form  IE asks if you want to close the browser. FF3 does not do this.

I dont know a way of detecting the browser has been closed

I hope this helps

Jay

 

 

 
New Post 3/23/2009 3:30 PM
  jasb
275 posts
4th Level Poster


Re: Help on session logout 

Oh i see Jay,

I know it's possible to detect if the browser was closed, this because i have homebanking, and the bank i use, does that when i close the browser to destroy the session.

Perhaps someone else knows?

If so, help :P

 

Jorge

 
New Post 3/23/2009 5:14 PM
  palli
11189 posts
1st Level Poster




Re: Help on session logout 

Hi Jorge,

First, thanks Jay for your help.

Jorge, there is a possibility to do that, but with limitation because of the Client/Server implementation of VWG. Take a look at these threads here and here.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 3/24/2009 7:15 AM
  jasb
275 posts
4th Level Poster


Re: Help on session logout 

Palli,

Need a little help converting this to VB

so, on load:

Application.ThreadSuspend += New EventHandler(Application_ThreadSuspend)

and the sub:

Sub Application_ThreadSuspende(ByVal sender As Object, ByVal e As Object)
        Me.Context.Session.IsLoggedOn = False
End Sub

But it complains that it is a sub and tell's me to use the raiseevent, well, must be honest, have no idea howto :)

Jorge,

 
Previous Previous
 
Next Next
  Forum  General Visual ...  How do I...?  Help on session logout
Assessment Bottom
.NET Web, Cloud and Mobile application delivery platform | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2011 Visual WebGui®       Visual WebGui weblog on ASP.NET Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS