Re: Forms authentication - seems to log out every once in a while.



OK color me embarrassed.

How do I do that? Just the FormsAuthenticationTicket code and the add
cookies code?

TIA - ( a pretty embarrassed ) Jeff.

"bruce barker" <nospam@xxxxxxxxxx> wrote in message
news:ut586srpHHA.3252@xxxxxxxxxxxxxxxxxxxxxxx
you need to update the cookie timeout on every page request, not just at
login.

-- bruce (sqlwork.com)


Mufasa wrote:
In my website, we are using forms authentication. But every once in a
while, it will seem to log you out suddenly when your in the middle of
doing something.

In my login page, I do the following code once the person has logged in
successfully:



FormsAuthentication.Initialize()
'The AddMinutes determines how long the user will be
logged in after leaving
' the site if he doesn't log off.
Dim fat As FormsAuthenticationTicket = New
FormsAuthenticationTicket(1, tbUserID.Text, DateTime.Now, _
DateTime.Now.AddMinutes(30), True, lsRole,
FormsAuthentication.FormsCookiePath)
Response.Cookies.Add(New
HttpCookie(FormsAuthentication.FormsCookieName, _
FormsAuthentication.Encrypt(fat)))


Is there anything else I need to do or will this take care of it.

TIA - Jeff.


.



Relevant Pages

  • Anybody have a slick way to tell if people are on the system?
    ... Does anybody have a slick way to tell if people are on the system. ... login so I can tell if a user is authenticated. ... TIA - Jeff. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Shockwave object doesnt work when IE7 is installed. - update.
    ... TIA - Jeff. ... Otherwise you may have a syntax error in the object tag. ... If we load the SWF file in IE it works fine. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Login on Internet Explorer website
    ... Dmitriy Lapshin [C# / .NET MVP] ... "Jeff" wrote in message ... > I'm trying to automate a login and file download process. ... The first page that comes up is a login page. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Default Sender
    ... > LOGIN ... >> Jeff Stephenson ... >> Outlook Development ...
    (microsoft.public.outlook.general)
  • Re: Truely unique file name.
    ... TIA - Jeff. ... You can call the GetTempFileName function through the P/Invoke layer. ... It allows you to specify the path for the filename to be created in. ...
    (microsoft.public.dotnet.languages.csharp)

Quantcast