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 ...Help! Users "randomly" getting logged outHelp! Users "randomly" getting logged out
Previous
 
Next
New Post
10/4/2006 12:38 AM
 

Recently I upgraded to dnn 4.3.5, and start to having the logouts (use to experience this with ver. 4.0.2, but solved).  I’m running on probably the most “problematic” host, Brinkster, and now, after 4 days testing, I’ve “resolved”.  The following is a list of findings and my personal configuration settings, you should test which will work for you, since it depends on your configuration.

 

  1. A lot of users have this problem when browsing with IE 6, not with FF, Opera, Netscape, and believe me, it will be worse with IE 7.  Why? Dunno, but differences sugest only two things to me: javascript and security.  And this problem it’s not exclusively of ASP.Net, it happens with PHP and Java.
  2. So, why I was losing the session when browsing with IE? IE was not passing the session cookie (.ASPXANONYMOUS) on GET request to the server, most of the time when requesting dnn.dom.positioning.js, sometimes when requesting images, and fewer times when requesting a page .aspx with a tabid.  You can use www.fiddlertool.com to see what’s happening with requests/responses.  The problem arises when the server can’t see the sessionID in the request, and issue another sessionID in the response.
  3. Check with the host that you’re not running on web farm or web garden (unless it’s configured to run only 1 worker process), and that your site is configured for asp.net 1.1 or 2.0, depending on the dnn version.
  4. Disable Friendly URL
  5. Set Authenticated Cacheability to Private
  6. Clear your logs and cache frequently (it depends on how many portals you have in one installation)
  7. Set Module Caching Method to Disk
  8. Add a P3P response header (google for p3p editor free)
  9. Add Response.Cache.AppendCacheExtension("post-check=900,pre-check=3600"), this and the P3P response can be added to the dnn membership module (DotNetNuke.HttpModules.DNNMembership.dll)

 

The only problem now is…. I can’t logout in IE… I can, but have to refresh the page :) . Ohhh how much I love you Firefox!!!

 

Hope this helps!

 
New Post
10/4/2006 2:02 PM
 
so what is Authenticated Cacheability?

DotNetNuke Search Engine
ASP.Net Search Engine
Email me to add your favorite sites to the search List.
 
New Post
10/4/2006 2:22 PM
 

and how do you do this:

 

  1. Add a P3P response header (google for p3p editor free)

DotNetNuke Search Engine
ASP.Net Search Engine
Email me to add your favorite sites to the search List.
 
New Post
10/7/2006 3:29 AM
 
Bad news first

The steps I’ve posted before only extend in some way my sessions, so it doesn’t work.  Sorry if I confuse you or make you waste your time…

The good news

Just add this code to the global.asax file in the root of your DNN installation.  This will fix the problem with cookies in IE.  Let me know if it works for you.  Remember I'm using DNN 4.3.5

<script language="VB" runat="server">
    Sub Application_EndRequest(ByVal s As Object, ByVal e As EventArgs)
        Dim SiteNameURL As Object
        Dim Context As HttpContext = CType(s, HttpApplication).Context
        Dim Response As HttpResponse = Context.Response
        'Request domain name
        SiteNameURL = Request.ServerVariables.Item("SERVER_NAME")
        'Get components of domain name
        Dim urlarray() As String = Split(SiteNameURL, ".", , CompareMethod.Text)
        'Create domain name for cookie
        Select Case urlarray.Length
            Case 2
                SiteNameURL = "." + SiteNameURL
            Case 3
                SiteNameURL = "." + urlarray(1) + "." + urlarray(2)
            Case Else
                SiteNameURL = "." + urlarray(urlarray.Length - 2) + "." + urlarray(urlarray.Length - 3)
        End Select
        'Set domain to cookies
        If Response.Cookies.Count > 0 Then
            For Each cookie As String In Response.Cookies.AllKeys
                Dim name As String = cookie.ToString.ToUpper
                Select Case name
                    'Should use your own cookie names
                    Case ".ASPXANONYMOUS", "ASP.NET_SESSIONID", "LANGUAGE", ".DOTNETNUKE", "PORTALALIASID", "PORTALROLES"
                        'Uncomment next line to disable Httponly cookies
                        'Response.Cookies(cookie).HttpOnly = False
                        'Set domain
                        Response.Cookies(cookie).Domain = SiteNameURL
                        'Set path, change DNN to your DotNetNuke installation folder or leave just “/”
                        Response.Cookies(cookie).Path = "/DNN"
                End Select
            Next
        End If
    End Sub
</script>

The P3P header can be added here too. Next is an example.
Response.AddHeader("P3P", "CP='BUS CUR CONo FIN IVDo ONL OUR PHY SAMo DSP IDC COR'")

Depending on security/privacy settings in IE, websites will require to send this header, otherwise, cookies may be rejected.

Rgds,
Llamil
 
New Post
10/10/2006 4:48 AM
 
Seriously guys can we get a FAQ up about "logging out" problems. I have had this issue for over a year and there is no fix, and it has nothing to do with any of this, and I can't believe you're saying IE is not accepting cookies for you.

Jason Honingford - Web & Software Developer
www.PortVista.com
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Help! Users "randomly" getting logged outHelp! Users "randomly" getting logged out


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