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 ...DNN killing cookies...DNN killing cookies...
Previous
 
Next
New Post
8/20/2008 4:02 PM
 

Hi All,

I am working on a module for our site and am running into a baffling problem. I am writing a module that provides a state listbox. When you select a state, it calls my webservice which then provides a cities listbox and available media channels for that city to be played by Windows Media Player.

The problem is I'm saving the listbox states in cookies. When I run my module stand-alone in a regular HTML page, everything works correctly.

Link to stand-alone module code: http://www.senior-clique.com/citiclique/

When on this page, select a state and city, then close your browser and re-open. You'll see that the settings have been retained.

But when I try to run it in DNN, state management is lost. Please look here: http://www.senior-clique.com

This is a MAJOR problem as the module is getting reset when navigating from page-to-page.

Is there something in DNN that is resetting cookies for the domain it is running on? Please help...


Warm regards,
Joseph J. Baranauskas
Systems Architect
joe@curbkicked.com
 
New Post
8/20/2008 7:29 PM
 

it's not resetting cookies, but we do add the httponly setting to all cookies to mitigate against xss attacks (see http://www.dotnetnuke.com/Community/Blogs/tabid/825/EntryID/256/Default.aspx for more details).


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
8/20/2008 7:32 PM
 

whoops, didn't paste the rest of the reply.

to test if httponly cookies are causing you the issue, try editing Library\HttpModules\Membership\MembershipModule.vb and commenting out the following block and recompiling

    'avoid adding to .net 2 as httpOnlyCookies default to true in 2.0
            If System.Environment.Version.Major < 2 Then
                Const HTTPONLYSTRING As String = ";HttpOnly"
                For Each cookie As String In Response.Cookies
                    Dim path As String = Response.Cookies(cookie).Path
                    If path.EndsWith(HTTPONLYSTRING) = False Then
                        'append HttpOnly to cookie
                        Response.Cookies(cookie).Path += HTTPONLYSTRING
                    End If
                Next
            End If
        End Sub


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
8/20/2008 9:32 PM
 

Hi Cathal,

Thank you so much for the direction. I'll be giving this a shot in the next few hours and report the results.

I do have another question relating to cookies. I noticed in web.config a setting called "PersistentCookieTimeout". It is set to a value of 0. Could this setting also be a possibility? What is the function of this setting?
 

Again, I deeply appreciate the suggestion and hopefully this is what's causing the problem. Will let you know. ;-)


Warm regards,
Joseph J. Baranauskas
Systems Architect
joe@curbkicked.com
 
New Post
8/21/2008 6:56 AM
 

it's a slightly difference thing, it's a custom workaround for the broken asp.net 2.0 cookie expiration behaviour - see http://www.dotnetnuke.com/Community/Blogs/tabid/825/EntryID/1784/Default.aspx for more details

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...DNN killing cookies...DNN killing cookies...


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