Re: FormsAuthentication.Encrypt problem

From: Hernan de Lahitte (hernan_at_lagash.com)
Date: 03/12/04

  • Next message: Andy Mortimer [MS]: "RE: ASPNET under Windows 2000 what with Windows 2003?"
    Date: Fri, 12 Mar 2004 12:48:26 -0300
    
    

    Hi,

    The cookie limit of 4K is certainly an issue here when you have userData of
    size greater than 1K because FormsAuth performs several operations on your
    data before it gets ready for packing inside a cookie. This operations like
    encoding in Hexa (size x 2) and the addition of some entropy random
    material, expands the userData size in a way that it quickly reach this 4K
    limit. Unfortunately you won't notice what is really happening hence no
    exception is thrown. The only strange behavior is that Forms seems not to be
    working as expected. So beware of you userData size! (I know, it should have
    been documented).

    Regards,

    -- 
    Hernan de Lahitte
    Lagash Systems S.A.
    http://weblogs.asp.net/hernandl
    Shadowfax Dev Team
    This posting is provided "AS IS" with no warranties, and confers no rights.
    "Mark Berryman [MSFT]" <markberr@online.microsoft.com> wrote in message
    news:YdbsQSECEHA.3164@cpmsftngxa06.phx.gbl...
    > I believe the size limit is on the entire cookie itself (4KB).
    >
    > -- 
    >
    > This posting is provided "AS IS" with no warranties, and confers no
    rights.
    > Use of included script samples are subject to the terms specified at
    > http://www.microsoft.com/info/cpyright.htm
    >
    > Note:  For the benefit of the community-at-large, all responses to this
    > message are best directed to the newsgroup/thread from which they
    > originated.
    >
    

  • Next message: Andy Mortimer [MS]: "RE: ASPNET under Windows 2000 what with Windows 2003?"

    Relevant Pages

    • Re: Cookies Expiring due to different time zones.
      ... perfectly fine on my PC and many other PCs which have correct time. ... But, if I set date to some old date, user is simply unable to login. ... This makes sense as probably cookie timing is not matching. ... this.loginUser1.RememberMeSet, userData); ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Cookie expiration issues
      ... public static bool LoginUser(int aPersonID, string userRole, bool ... // Save crucial data in userData ... System.DateTime.Now, // Time cookie issued ... persistentLogon, // Cookie persistence ...
      (microsoft.public.dotnet.framework.aspnet)
    • FormsAuthenticationTicket looses UserData
      ... Upon logon I create a ticket and put some userdata in it: ... FormsAuthenticationTicket ticket = new FormsAuthenticationTicket( ... //Hash the cookie for transport ... FormsIdentity id = HttpContext.Current.User.Identity; ...
      (microsoft.public.dotnet.framework.aspnet)
    • Cookies Expiring due to different time zones.
      ... perfectly fine on my PC and many other PCs which have correct time. ... But, if I set date to some old date, user is simply unable to login. ... This makes sense as probably cookie timing is not matching. ... this.loginUser1.RememberMeSet, userData); ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Internet game windows
      ... In the status bar you should see a red circle with a white line ... site who's cookie is being blocked by the browser.. ... My advice is donated "AS IS" without warranty; nor do I confer any rights. ... chose to allow popups from this site, and the game ...
      (microsoft.public.windowsxp.games)