Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Cookie issues
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Cookie issues

 Post Reply Post Reply
Author
User123 View Drop Down
Newbie
Newbie


Joined: 11 March 2007
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote User123 Quote  Post ReplyReply Direct Link To This Post Topic: Cookie issues
    Posted: 17 March 2007 at 12:52am
Virtually all of our forum users are complaining of having to log in constantly since the conversion to WebWiz.  Several of us have cleared our cookies, tried different browsers and browser versions and, while the behavior is erratic, it seems to happen everywhere.

I installed a cookie watcher extension in FF2.0 and so far it seems that the "WWF" cookie gets set but often it gets "cleared" (it just disappears sometimes between page loads).  After I see it go away in the cookie watcher, if I close the browser and then reload and go back to the forums I have to log in again.

Any others experiencing similar problems?  Any idea on what is causing this and how to resolve it?

There have been no server side changes to IIS for a long time and persistent cookies worked in the previous forums (Snitz) as well as on many other web sites on the same server.  I'm not saying it can't be a server issue, but it's not the first place I'm looking.

The only anomaly I have found so far (which I don't think has anything to do with the problem) is in "search_results_topics.asp".  Around line 420 is the following:
'Set the booleon variable if this is a new post since the users last visit and has not been read
If (CDate(dtmLastVisitDate) < dtmLastEntryDate) AND (Request.Cookies("RT")("TID" & lngTopicID) = "") Then blnNewPost = True Else blnNewPost = False

I can find nowhere that this cookie is referenced and it looks odd since every other cookie set/retrieve uses "strCookieName" in place of the "RT".  By default strCookieName = "WWF".

Any help is appreciated as it's driving us nuts Smile

---------------------------------
EZ-Frag[QODA]
http://www.qoda.net/
Back to Top
mceb View Drop Down
Newbie
Newbie
Avatar

Joined: 19 March 2007
Location: United States
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote mceb Quote  Post ReplyReply Direct Link To This Post Posted: 20 March 2007 at 12:04am
Hi user123, I use FF 1.5 and just put up a WW forum and noticed similar issue with having to relogin often.   I found this post that states it may be sensitive to different locations and logging user out for security.    I'm going to try not logging in from work to see if issue goes away.

http://forums.webwiz.net/forum_posts.asp?TID=22399&KW=timeout


Edited by mceb - 20 March 2007 at 12:07am
Back to Top
User123 View Drop Down
Newbie
Newbie


Joined: 11 March 2007
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote User123 Quote  Post ReplyReply Direct Link To This Post Posted: 21 March 2007 at 1:43pm
Thanks for the suggestion.  Alas it turned out to be combination of factors.  I made changes to the way WebWiz handles cookies and now all the users are happy.
Back to Top
User123 View Drop Down
Newbie
Newbie


Joined: 11 March 2007
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote User123 Quote  Post ReplyReply Direct Link To This Post Posted: 21 March 2007 at 1:53pm
While I can't easily post a "mod" to pass on the changes I made (cookies are referenced from many different places), the gist was to create centralized cookie functions:

functions/functions_cookies.asp
<%
dim cookiePath
cookiePath = left(request.servervariables("URL"),instrrev(request.servervariables("URL"),"/"))

'COOKIE MOD - rewritten cookie management
function getCookie(key)
    getCookie = Request.Cookies(strCookieName&"_MAIN")(key)
end function

sub setCookie(key,val)
    Response.Cookies(strCookieName&"_MAIN")(key) = val
    Response.Cookies(strCookieName&"_MAIN").Path = cookiePath
    Response.Cookies(strCookieName&"_MAIN").Expires = DateAdd("yyyy", 1, Now())
end sub

sub clearCookie()
    Response.Cookies(strCookieName&"_MAIN") = ""
end sub

function getUserCookie(key)
    getUserCookie = Request.Cookies(strCookieName&"_USER")(key)
end function

sub setUserCookie(key,val,keep)
    Response.Cookies(strCookieName&"_USER")(key) = val
    Response.Cookies(strCookieName&"_USER").Path = cookiePath
    if keep then
        Response.Cookies(strCookieName&"_USER").Expires = DateAdd("yyyy", 1, Now())
    end if
end sub

sub clearUserCookie()
    Response.Cookies(strCookieName&"_USER")=""
end sub
%>


I then changed literally every reference to Request.Cookies and Response.Cookies to call the appropriate function above.  This is still fairly quick and dirty but, in my case, it solved the necessary path issue for the forums (which are in a subfolder and were sometimes getting stomped on by the portal software), as well as keeping persistent information in a separate cookie.

HTH


Edited by User123 - 21 March 2007 at 2:01pm
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.