473,410 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,410 software developers and data experts.

cookie timeout

Hello,

I am developping some webpages where our PDA-user can access some
company information. Our webserver has asp.net 1.1 installed.

Users can login and access the information, after a period of non-
activity the session should expire and the user has to login again. I
tried to do this with the following web.config.

<configuration>
<system.web>
<sessionState timeout="20" />
<authentication mode="Windows">
<forms name=".ComapanyCookie" loginUrl="login.aspx" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</configuration>

When accessing the site there appears a pop-up and we can login.
However the session never expires. I was told this has something to do
with a persistent cookie that defaults to a timeout of 50 years.

What do I have to do get the time-out of 20 minutes.

Thanks,

John
Oct 29 '08 #1
3 5148
On Oct 29, 11:36*am, jbhab...@gmail.com wrote:
Hello,

I am developping some webpages where our PDA-user can access some
company information. Our webserver has asp.net 1.1 installed.

Users can login and access the information, after a period of non-
activity the session should expire and the user has to login again. I
tried to do this with the following web.config.

<configuration>
*<system.web>
* * <sessionState timeout="20" />
* * <authentication mode="Windows">
* * * *<forms name=".ComapanyCookie" loginUrl="login.aspx" />
* * </authentication>
* * <authorization>
* * * *<deny users="?" />
* * </authorization>
*</system.web>
</configuration>

When accessing the site there appears a pop-up and we can login.
However the session never expires. I was told this has something to do
with a persistent cookie that defaults to a timeout of 50 years.

What do I have to do get the time-out of 20 minutes.

Thanks,

John
When you have authentication mode set to "Windows" why do you need to
"login" user again? Your web.config file has forms attribute which is
for custom Forms-based authentication.

http://msdn.microsoft.com/en-us/library/532aee0e.aspx

Oct 29 '08 #2
Hello Alexey,

I agree, ther forms attribute is not needed. A call to login.aspx is
never made since I changed from Forms to Windows. Windows
Authentication uses it's own pop-up window.

Problem is when used in there is no time-out, how can I change my code
so the specified time-out is used.

John

On 29 okt, 14:16, Alexey Smirnov <alexey.smir...@gmail.comwrote:
On Oct 29, 11:36*am, jbhab...@gmail.com wrote:


Hello,
I am developping some webpages where our PDA-user can access some
company information. Our webserver has asp.net 1.1 installed.
Users can login and access the information, after a period of non-
activity the session should expire and the user has to login again. I
tried to do this with the following web.config.
<configuration>
*<system.web>
* * <sessionState timeout="20" />
* * <authentication mode="Windows">
* * * *<forms name=".ComapanyCookie" loginUrl="login.aspx" />
* * </authentication>
* * <authorization>
* * * *<deny users="?" />
* * </authorization>
*</system.web>
</configuration>
When accessing the site there appears a pop-up and we can login.
However the session never expires. I was told this has something to do
with a persistent cookie that defaults to a timeout of 50 years.
What do I have to do get the time-out of 20 minutes.
Thanks,
John

When you have authentication mode set to "Windows" why do you need to
"login" user again? Your web.config file has forms attribute which is
for custom Forms-based authentication.

http://msdn.microsoft.com/en-us/library/532aee0e.aspx- Tekst uit oorspronkelijk bericht niet weergeven -

- Tekst uit oorspronkelijk bericht weergeven -
Oct 30 '08 #3
On Oct 30, 12:41*pm, jbhab...@gmail.com wrote:
Hello Alexey,

I agree, ther forms attribute is not needed. A call to login.aspx is
never made since I changed from Forms to Windows. Windows
Authentication uses it's own pop-up window.

Problem is when used in there is no time-out, how can I change my code
so the specified time-out is used.

John

On 29 okt, 14:16, Alexey Smirnov <alexey.smir...@gmail.comwrote:
On Oct 29, 11:36*am, jbhab...@gmail.com wrote:
Hello,
I am developping some webpages where our PDA-user can access some
company information. Our webserver has asp.net 1.1 installed.
Users can login and access the information, after a period of non-
activity the session should expire and the user has to login again. I
tried to do this with the following web.config.
<configuration>
*<system.web>
* * <sessionState timeout="20" />
* * <authentication mode="Windows">
* * * *<forms name=".ComapanyCookie" loginUrl="login.aspx" />
* * </authentication>
* * <authorization>
* * * *<deny users="?" />
* * </authorization>
*</system.web>
</configuration>
When accessing the site there appears a pop-up and we can login.
However the session never expires. I was told this has something to do
with a persistent cookie that defaults to a timeout of 50 years.
What do I have to do get the time-out of 20 minutes.
Thanks,
John
When you have authentication mode set to "Windows" why do you need to
"login" user again? Your web.config file has forms attribute which is
for custom Forms-based authentication.
http://msdn.microsoft.com/en-us/libr...e0e.aspx-Tekst uit oorspronkelijk bericht niet weergeven -
- Tekst uit oorspronkelijk bericht weergeven -
Hi John,

If you have already logged on to Windows, and the browser is
configured to automatically send credentials, Integrated Windows
authentication uses your logon information to authenticate you, so it
won't prompt you for a username and password. To force a logon dialog
try to send HTTP 401 message

Response.StatusCode = 401;
Response.StatusDescription = "Unauthorized";
Response.End();

How to detect a timeout
http://www.google.com/search?hl=en&q...imeout+asp.net

Hope this helps

Oct 30 '08 #4

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

Similar topics

7
by: Christoph Pieper | last post by:
Hi, we've the following problem : We have an asp-application which sets the cookie on first login. The cookie will never be touched during user access. The user can work the whole day, but...
0
by: Sebastien Roeckel | last post by:
Hello I have a problem with the authentication cookie timeout in a forms authentication. I've developed a Web application that uses forms authentication. My web.config is configured for the...
0
by: Kepler | last post by:
I'm testing very basic FormsAuthentication and having trouble with non-persistent cookies. Once authenticated with a non-persistent cookie, if I leave the browser alone for 30 minutes,...
0
by: briand | last post by:
I have the following code in my base page to redirect to a session timeout page. override protected void OnInit(EventArgs e) { base.OnInit(e); //It appears from testing that the Request...
2
by: Martin Dew | last post by:
Hi, I am using ASP.Net for a website, I use the following code; <authentication mode="Forms"> <forms name=".ADASTRATEAROUNDS" loginUrl="login.aspx" protection="All" timeout="30" path="/"> ...
8
by: bashful.belle | last post by:
I'm using Forms authentication and a non persistent cookie in my asp.net application. How do i get the cookie to time out after a period of inactivity, say 10 minutes, and force the user to login...
15
by: Edwin Knoppert | last post by:
I have searched but info is limitted. In my test app i used a non persistant cookie for forms authentication. slidingExpiration is set to true On run and close and rerun the login remains ok....
7
by: Adam Bates | last post by:
Hello, I have a problem, I have been using Cookie Authentication on the 1.1 framework for around 3 months, when I moved the site internally within my hosting company from a server with 1.1...
5
by: SJ | last post by:
Hi, In my website, i have a cookie that allows the user to remain logged in for upto 90days. So I'm setting the cookie expiration time to 90 days in the future from the time the user logs in....
4
by: GaryDean | last post by:
I'm using the 2.0 login control with the "remember me" setting. When checked the cookie only last for a few hours then it is asking again for a login. I don't see any time settings. I know back...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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
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...

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.