forms.timeout returns session.timeout

Discussion in 'ASP .Net' started by Neoinan, Jun 10, 2007.

  1. Neoinan

    Neoinan Guest

    hi

    I am trying to access authentication.forms.timeout using the
    following code from Microsoft. But it returns the session.timeout,
    which I do not want as for my application this needs to be set longer
    than the forms.timeout.

    ' Get the Web application configuration.
    Dim configuration As System.Configuration.Configuration =
    WebConfigurationManager.OpenWebConfiguration("")

    'Get the authentication section.
    Dim authenticationSection As AuthenticationSection =
    CType(Configuration.GetSection( "system.web/authentication"),
    AuthenticationSection)

    litTimeout.Text = authenticationSection.Forms.Timeout.ToString

    This code was taken straight from the following url
    mshelp://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEVFX.v20.en/cpref12/html/T_System_Web_Configuration_FormsAuthenticationConfiguration.htm

    I have session.timeout set to 30 and forms.timeout set to 1. The
    above code returns 30.

    Can any helpful soul tell me where I am going wrong.

    Nic
     
    Neoinan, Jun 10, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Do
    Replies:
    2
    Views:
    6,402
  2. Sosh
    Replies:
    1
    Views:
    1,883
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Dec 31, 2005
  3. =?Utf-8?B?Um9iSEs=?=
    Replies:
    4
    Views:
    5,342
    =?Utf-8?B?Um9iSEs=?=
    Apr 11, 2007
  4. gnewsgroup

    Forms timeout, Session timeout

    gnewsgroup, Apr 21, 2008, in forum: ASP .Net
    Replies:
    0
    Views:
    531
    gnewsgroup
    Apr 21, 2008
  5. Eric
    Replies:
    2
    Views:
    595
Loading...

Share This Page