473,503 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setting Forms Authentication...

Hi there,

I am trying to use an entry level security for my resources website. I
followed the procedures in the MS published Self-Paced Training Kit,
everything seems working as expected. However, I found that the
authentication cookie never expires.

I thought the default timeout is 30 minutes. Please tell me if I miss any
step...

Thanks a lot,
Kian
<authentication mode="Forms">
<forms loginUrl="ResourcesLogon.aspx">
<credentials passwordFormat="Clear">
<user name="kk" password="dd"/>
</credentials>
</forms>
</authentication>
<authorization>
<deny users="?" /> <!--Deny all unauthenticated users-->
</authorization>
Nov 17 '05 #1
2 1258
Two things - You would need to set the timeout:
<authentication mode="Forms">
<forms name=".YourAppCookieName"
loginUrl="login.aspx"
protection="All"
timeout="60" '<--------here - Number of minutes until authentication
cookie expires.
path="/"
/>
</authentication>

Also - in your login page, when you have the redirection statement - if you
have:
FormsAuthentication.RedirectFromLoginPage(txtUID.t ext, True) '<---- if you
set this to 'True", then it sets a permanent cookie, with an expiration date
about 50 years from it's creation date.
David Wier
http://aspnet101.com
http://aspexpress.com
"Kian Goh" <ki************@hotmail.com> wrote in message
news:eF**************@tk2msftngp13.phx.gbl...
Hi there,

I am trying to use an entry level security for my resources website. I
followed the procedures in the MS published Self-Paced Training Kit,
everything seems working as expected. However, I found that the
authentication cookie never expires.

I thought the default timeout is 30 minutes. Please tell me if I miss any
step...

Thanks a lot,
Kian
<authentication mode="Forms">
<forms loginUrl="ResourcesLogon.aspx">
<credentials passwordFormat="Clear">
<user name="kk" password="dd"/>
</credentials>
</forms>
</authentication>
<authorization>
<deny users="?" /> <!--Deny all unauthenticated users-->
</authorization>

Nov 17 '05 #2
Thanks a lot, David.

It is working now.
"David Wier" <dw***@nospamASPNet101.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Two things - You would need to set the timeout:
<authentication mode="Forms">
<forms name=".YourAppCookieName"
loginUrl="login.aspx"
protection="All"
timeout="60" '<--------here - Number of minutes until authentication
cookie expires.
path="/"
/>
</authentication>

Also - in your login page, when you have the redirection statement - if you have:
FormsAuthentication.RedirectFromLoginPage(txtUID.t ext, True) '<---- if you
set this to 'True", then it sets a permanent cookie, with an expiration date about 50 years from it's creation date.
David Wier
http://aspnet101.com
http://aspexpress.com
"Kian Goh" <ki************@hotmail.com> wrote in message
news:eF**************@tk2msftngp13.phx.gbl...
Hi there,

I am trying to use an entry level security for my resources website. I
followed the procedures in the MS published Self-Paced Training Kit,
everything seems working as expected. However, I found that the
authentication cookie never expires.

I thought the default timeout is 30 minutes. Please tell me if I miss any step...

Thanks a lot,
Kian
<authentication mode="Forms">
<forms loginUrl="ResourcesLogon.aspx">
<credentials passwordFormat="Clear">
<user name="kk" password="dd"/>
</credentials>
</forms>
</authentication>
<authorization>
<deny users="?" /> <!--Deny all unauthenticated users-->
</authorization>


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
1692
by: VB Programmer | last post by:
PLEASE HELP.... I'm having trouble. In my login form after I've verified the username/password are valid I do this: Select Case iMyPrivilege Case 0 Dim arrRoles() As String = {"guest"}...
2
1431
by: Ed | last post by:
Hi I currently have an asp.NET project. I'm using Access 2003 and forms authentication to authenticate users. Can anyone tell me how to set the roles in asp.NET so that it recognizes them? The...
1
3703
by: jeremy.stitt | last post by:
Does anyone know if it is possible to set IIS authentication methods (e.g. anonymous access, basic authentication, IWA, etc) in the web.config file? For example, I want to remove Anonymous...
6
4256
by: John H Clark | last post by:
I am designing a site that requires AnonymousID. I set my web.config to allow this using <anonymousIdentification enable="true".../as recommended in the documentation. To verify the settings I...
0
7201
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7083
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6988
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7456
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5011
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3166
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1510
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
379
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.