YAFLogo

marinette3
  • marinette3
  • 53% (Neutral)
  • YAF Forumling Topic Starter
13 years ago
I discovered that < 1% of the time a YAFNET guest cookie interferes with signon feature for the site and the user needs a cookie cleaner to correct it. You will see users that login but remain as guest after login. This is rare but does happen.

I wrote the following page to expire the .YAFNET_Authentication cookie which corrects the issue.

zapcooky.aspx

<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" Inherits="YAF.ForumPageBase" %>

<%@ Register TagPrefix="YAF" Assembly="YAF" Namespace="YAF" %>

WebForm1

Width="184px" Height="72px">Signin problems for marinette site 

Text="ClearYAFNET Cookie" CommandName="clearcooky">

Width="184px" Height="72px">PUSH BUTTON TO CLEAR YAFNET COOKIE for Marinetteboat forum

<%

HttpCookie myCookie = new HttpCookie(".YAFNET_Authentication");

myCookie.Expires = DateTime.Now.AddDays(-1d);

Response.Cookies.Add(myCookie);

FormsAuthentication.SignOut();

%>

I needed to add

FormsAuthentication.SignOut();

The .YAFNET_Authentication and SignOut correct the browser holding on to session expiry upon password changes. Both seem to be needed to correct guest .YAFNET session problems where the user signs in correctly, but remains as a guest in IE. (corrected does happen in firefox). Firefox does not seem to need this at all.

The button does nothing... but is appears to be necessary user feedback.

best

Sponsor
marinette3
  • marinette3
  • 53% (Neutral)
  • YAF Forumling Topic Starter
13 years ago
This seems to be necessary for browsers that save passwords. Fixed a user today with zapcooky.