Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > RedirectFromLoginPage persistent cookie expiration

Reply
Thread Tools

RedirectFromLoginPage persistent cookie expiration

 
 
jester
Guest
Posts: n/a
 
      11-29-2004

Passing true for the second parameter of RedirectFromLoginPage creates a
persistent cookie. When does this cookie expire?

 
Reply With Quote
 
 
 
 
John Paul. A
Guest
Posts: n/a
 
      11-29-2004
Hi jester,
Please check your config file. If everything goes right, please check the
security settings for the dll.
Rgds,
John Paul. A

"jester" wrote:

>
> Passing true for the second parameter of RedirectFromLoginPage creates a
> persistent cookie. When does this cookie expire?
>

 
Reply With Quote
 
 
 
 
John Paul. A
Guest
Posts: n/a
 
      11-29-2004
Hi jester,
Please ignore my previous reply, becoz my reply to DPAPI has come here.

Regarding the RedirectFromLoginPage - persistent cookie, you can control the
expiration date, it is also a good practice too..
Here how you can do?

If persistentCookie And expirationDays > 0 Then
' Get a reference to the cookie just created.
Dim cookie As HttpCookie = Response.Cookies _
(FormsAuthentication.FormsCookieName)
' Set its expiration date.
cookie.Expires = Now.AddDays(expirationDays)
' Ensure the cookie can travel only over https.
'cookie.Secure = True
End If

Rgds,
John Paul. A


"jester" wrote:

>
> Passing true for the second parameter of RedirectFromLoginPage creates a
> persistent cookie. When does this cookie expire?
>

 
Reply With Quote
 
jester
Guest
Posts: n/a
 
      11-30-2004

But what would be the default cookie expiration if I don't set it explicitly?

"John Paul. A" wrote:

> Hi jester,
> Please ignore my previous reply, becoz my reply to DPAPI has come here.
>
> Regarding the RedirectFromLoginPage - persistent cookie, you can control the
> expiration date, it is also a good practice too..
> Here how you can do?
>
> If persistentCookie And expirationDays > 0 Then
> ' Get a reference to the cookie just created.
> Dim cookie As HttpCookie = Response.Cookies _
> (FormsAuthentication.FormsCookieName)
> ' Set its expiration date.
> cookie.Expires = Now.AddDays(expirationDays)
> ' Ensure the cookie can travel only over https.
> 'cookie.Secure = True
> End If
>
> Rgds,
> John Paul. A
>
>
> "jester" wrote:
>
> >
> > Passing true for the second parameter of RedirectFromLoginPage creates a
> > persistent cookie. When does this cookie expire?
> >

 
Reply With Quote
 
John Paul. A
Guest
Posts: n/a
 
      12-01-2004
Dear jester,
The default time-out limit is 20 minutes.
Please see the Microsoft documentation "Configuring ASP.NET Applications to
Use the Appropriate Session State"

http://www.microsoft.com/resources/d...g_net_mshe.asp

Sorry.. The URL is bit long...

Rgds,
John Paul. A

"jester" wrote:

>
> But what would be the default cookie expiration if I don't set it explicitly?
>
> "John Paul. A" wrote:
>
> > Hi jester,
> > Please ignore my previous reply, becoz my reply to DPAPI has come here.
> >
> > Regarding the RedirectFromLoginPage - persistent cookie, you can control the
> > expiration date, it is also a good practice too..
> > Here how you can do?
> >
> > If persistentCookie And expirationDays > 0 Then
> > ' Get a reference to the cookie just created.
> > Dim cookie As HttpCookie = Response.Cookies _
> > (FormsAuthentication.FormsCookieName)
> > ' Set its expiration date.
> > cookie.Expires = Now.AddDays(expirationDays)
> > ' Ensure the cookie can travel only over https.
> > 'cookie.Secure = True
> > End If
> >
> > Rgds,
> > John Paul. A
> >
> >
> > "jester" wrote:
> >
> > >
> > > Passing true for the second parameter of RedirectFromLoginPage creates a
> > > persistent cookie. When does this cookie expire?
> > >

 
Reply With Quote
 
jester
Guest
Posts: n/a
 
      12-02-2004

Thanks, John Paul.

"John Paul. A" wrote:

> Dear jester,
> The default time-out limit is 20 minutes.
> Please see the Microsoft documentation "Configuring ASP.NET Applications to
> Use the Appropriate Session State"
>
> http://www.microsoft.com/resources/d...g_net_mshe.asp
>
> Sorry.. The URL is bit long...
>
> Rgds,
> John Paul. A
>
> "jester" wrote:
>
> >
> > But what would be the default cookie expiration if I don't set it explicitly?
> >
> > "John Paul. A" wrote:
> >
> > > Hi jester,
> > > Please ignore my previous reply, becoz my reply to DPAPI has come here.
> > >
> > > Regarding the RedirectFromLoginPage - persistent cookie, you can control the
> > > expiration date, it is also a good practice too..
> > > Here how you can do?
> > >
> > > If persistentCookie And expirationDays > 0 Then
> > > ' Get a reference to the cookie just created.
> > > Dim cookie As HttpCookie = Response.Cookies _
> > > (FormsAuthentication.FormsCookieName)
> > > ' Set its expiration date.
> > > cookie.Expires = Now.AddDays(expirationDays)
> > > ' Ensure the cookie can travel only over https.
> > > 'cookie.Secure = True
> > > End If
> > >
> > > Rgds,
> > > John Paul. A
> > >
> > >
> > > "jester" wrote:
> > >
> > > >
> > > > Passing true for the second parameter of RedirectFromLoginPage creates a
> > > > persistent cookie. When does this cookie expire?
> > > >

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Persistent field and Persistent properties - difference gk Java 7 10-12-2010 09:43 PM
What relationship between cookie and ticket expiration? =?Utf-8?B?QmlsbCBCb3Jn?= ASP .Net 2 12-23-2004 07:27 AM
Trying to understand ticket/cookie expiration =?Utf-8?B?QmlsbCBCb3Jn?= ASP .Net 0 10-08-2004 10:43 PM
COOKIE EXPIRATION TIME =?Utf-8?B?T2xlZyBMZWlraW4=?= ASP .Net 15 08-04-2004 02:17 PM
Cookie Expiration Brian ASP .Net 0 07-28-2003 07:55 PM



Advertisments