Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Force Browser Close on Logout?Force Browser Close on Logout?
Previous
 
Next
New Post
6/5/2009 5:32 PM
 

How can I force a browser close when a user hits logout?

 
New Post
6/6/2009 3:19 PM
 

Figured it out....In case anyone else needs it:

The login code is found here:

\Inetpub\wwwroot\dotnetnuke\admin\Skins\Login.ascx.vb
 
On the cmdlogin_click sub I changed:
Response.Redirect(NavigateURL(PortalSettings.HomeTabId, "Logoff"), True)
 
At the first argument to:
 
Private Sub cmdLogin_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdLogin.Click
            Try
                If Request.IsAuthenticated = True Then
                    If PortalSettings.HomeTabId <> -1 Then
                        Response.Write("<script language='javascript'> { window.close();}</script>")
                       
                    Else
                        Response.Redirect(NavigateURL(PortalSettings.ActiveTab.TabID, "Logoff"), True)
                    End If
                Else
 
I hope this helps anyone else needing this!
 
New Post
6/6/2009 8:04 PM
 

Most, if not all, browsers allow the user to prevent javascript from closing the window.

I can be useful, but it can also be prevented/worked around.

IMO, unless there is a compelling need (such as a popup window) trying to close a browser window is more likely to annoy the user than anything else. At least it always did me.

 
New Post
6/7/2009 9:43 AM
 

Your correct, it can be prevented in browsers, but for my need it was necessary. Our development team built a nurse system, built around the dotnetnuke framework. They asked me to incorporate active directory, and to make it COMPLETELY seamless. Orginally I did setup active directory but kept the forms authentication enabled the web.config, which allowed for them to logout, etc. My development team didnt like that due to the account login was confusing ( the two buttons standard, windows login ) and the iframe was causing double credential checks., so I then enabled windows authentication in web.config which fixed they things forms authentication didnt. BUT, with one draw back, they couldnt logout. because of the limitation of asp.net and logging out of windows authentication, I had 2 possibilities to work with, 1 close the browser on logout or 2 find a way to clear credentials both using javascript. So all and all it worked out doing what i did, our nurses arent exactly computer savy.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Force Browser Close on Logout?Force Browser Close on Logout?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out