forms.timeout returns session.timeout

N

Neoinan

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top