473,748 Members | 10,889 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
<authenticati on mode="Forms">
<forms loginUrl="Resou rcesLogon.aspx" >
<credentials passwordFormat= "Clear">
<user name="kk" password="dd"/>
</credentials>
</forms>
</authentication>
<authorizatio n>
<deny users="?" /> <!--Deny all unauthenticated users-->
</authorization>
Nov 17 '05 #1
2 1277
Two things - You would need to set the timeout:
<authenticati on mode="Forms">
<forms name=".YourAppC ookieName"
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:
FormsAuthentica tion.RedirectFr omLoginPage(txt UID.text, 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******** ******@tk2msftn gp13.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
<authenticati on mode="Forms">
<forms loginUrl="Resou rcesLogon.aspx" >
<credentials passwordFormat= "Clear">
<user name="kk" password="dd"/>
</credentials>
</forms>
</authentication>
<authorizatio n>
<deny users="?" /> <!--Deny all unauthenticated users-->
</authorization>

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

It is working now.
"David Wier" <dw***@nospamAS PNet101.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
Two things - You would need to set the timeout:
<authenticati on mode="Forms">
<forms name=".YourAppC ookieName"
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:
FormsAuthentica tion.RedirectFr omLoginPage(txt UID.text, 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******** ******@tk2msftn gp13.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
<authenticati on mode="Forms">
<forms loginUrl="Resou rcesLogon.aspx" >
<credentials passwordFormat= "Clear">
<user name="kk" password="dd"/>
</credentials>
</forms>
</authentication>
<authorizatio n>
<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
1718
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"} Context.User = New System.Security.Principal.GenericPrincipal(User.Identity, arrRoles) Case 1
2
1445
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 logging in portion of my code works...What I need to know is how to allow access to certain pages to users with an administrator role while blocking access to regular users. My database has 3 columns, username, password, and roles. It is the last...
1
3714
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 Access for an entire directory in my ASP .NET project and only use Integrated Windows Authentication. Is there some way I can configure that in the web.config file or do I need my Infrastructure guys to make that change in IIS?
6
4288
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 use the following code in global.asax and stop the execution using debug to inspect the settings. Configuration configuration = WebConfigurationManager.OpenWebConfiguration("/SessionManager");
0
8991
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8830
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8242
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6074
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4602
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2782
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.