472,337 Members | 1,284 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

smart way to set "timeout" security

hi all,

I am developing a system using asp.net(c#). I am using "left" "top" & "Middle" design in my system. I want to set a time out mechanism. when the user has expired the configured time the user is derected to a tomeout mesassage page.

at the moment i am using fillowing code in page load metod in all middle pages.

if (Session["UserId"] != null)
if (!IsPostBack)
//// necessry methods



can anyone propose another smart way to do this?


Oct 12 '07 #1
1 1172
Shashi Sadasivan
1,435 Expert 1GB
Your code is almost pretty much necessary for each page that you create (except the login screen ofcourse)
You dont want people to bookmark pages and think that they can just get in without logging in later on.

To expire a session you can set its properties during the time you create the session. So the moment the session expires it would become null and then any postback even being triggered would transfer the user to the login page
Oct 12 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Carpe Diem | last post by:
Hello I have an aspx page that loses Session("user") value after a few minutes even after I set <sessionState mode="InProc" cookieless="false"...
by: --alec | last post by:
Is there a maximum recommended value for setting the timeout value in web.config section <sessionState mode="InProc" timeout="20" /> What...
by: Chris Langston | last post by:
I have a Web Server running IIS 5 or 6 on Windows 2K and Windows 2003 Server that is experiencing strange shutdown problems. We are using ASP.NET...
by: Nils Magnus Englund | last post by:
Hi, I've made a HttpModule which deals with user authentication. On the first request in a users session, it fetches data from a SQL Server using...
by: Nils Magnus Englund | last post by:
Hi, I've made a HttpModule which deals with user authentication. On the first request in a users session, it fetches data from a SQL Server using...
by: Agnes | last post by:
My client said when he got "Timeout Expired", once he press the button. whole applciation is quit. I want to "produce the same error " in my...
by: Wes Groleau | last post by:
I was doing update statements in SQL Server 2000. I have a table with over 16 million rows. It came from several hundred delimited text files,...
by: fhfx | last post by:
How do I test a "timeout" error when pulling an .asp page? How do I raise a "timeout"? How do I "catch" a time out using VBScript with ASP? ...
by: ahmnasa | last post by:
I have a website that has been running for over 1 year now that has never had these issues. Its running MS SQL Server 2005 Express Edition and...
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

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.