473,799 Members | 3,810 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Expire a Webpage (VB.Net)

16 New Member
Hi all, I'm studying creating webpages in VB.Net. After a successful Logon, I want that page to expire or simple disallow users to 'go back' to that page (not necessarily disable the back button). I have created webpages under the Master Page.

Thanks in advance,
Josh
Aug 1 '11 #1
6 2568
yarbrough40
320 Contributor
What method of "Log In" are you using?
What Logoff method(s) have you attempted so far?
Aug 2 '11 #2
Josh Andrews
16 New Member
Hi yarbrough40,
Login Method? Do you mean how do I connect to my database? I have an SQL db where the user profiles are stored. I use sql connection string (and sql data adapter) to check if users exist.

Log-off Method. I simply redirect them to my login page. My problem is that previous pages can still be navigated through even when the users are supposedly logged off the system :-(

I am a newbie in web development, so any help would be appreciated :-)
Aug 8 '11 #3
Josh Andrews
16 New Member
yarbrough40 I also have this procedure:

[code]
Protected Sub imgLogOff_Click (ByVal sender As Object, ByVal e As System.Web.UI.I mageClickEventA rgs) Handles imgLogOff.Click

Session.Clear()
Session.Abandon ()

End Sub

[\CODE]
Aug 8 '11 #4
Paul Johnson
97 New Member
I think yarbough40 means how are you getting the user to logon rather than how you check the SQL ;)

For not needing to return, you could just see if a session variable has been set on the login page. If it's set, return to the page you've just come from. You need to put it in the Page_Load routine (from memory - it's been a while since I've done this)

Session.Abandon () destroys the session and causes Session_OnEnd to be triggered

Session.Clear() clears the session object, but the session with the same key is still alive. In otherwords, if you want the user to not need to relogin, you use this.

In this case, Session.Clear() is not needed
Aug 9 '11 #5
Josh Andrews
16 New Member
Hi Paul, I tried using Session.Abandon () but still users can navigate through the pages.
Aug 15 '11 #6
Paul Johnson
97 New Member
Quite possibly they have a copy in their cache...

I would set a cookie which is deleted on Session.Abandon (). If it's there they can look around. If it's not they get redirected to the login (you may have to include it on the Page_Load routine for each page though - just call a common method)
Aug 15 '11 #7

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

Similar topics

0
1359
by: Angelos | last post by:
Hello there... I would like to know how to set the session timeout time locally and not globally in the php.ini file. I do that as it is ine www.php.net but doesn't seem to do anything /***************************/ /* set the cache limiter to 'private' */ session_cache_limiter('private'); $cache_limiter = session_cache_limiter(); /* set the cache expire to 1 minutes */
3
3856
by: Joey Powell | last post by:
This message was originally posted to the aspnet.security newsgroup, but no one there has ever heard of this before. That is why I am posting this message here, so that more people will see it... On my asp.net application, suddenly the forms authentication cookies for clients have quit expiring. This results in users being able to access the site from day to day without having to log in, even if their browers are closed and reopened...
2
3323
by: Dicky Cheng | last post by:
Hi, I am using absolute expiration to expire my cache object in Cache API. And I set it to expire after 60min. Then I test it, it cache, and everything fine. Then I stop working and lock computer (pc still running), then leave office. Second day I come to the office and unlock computer, the cache still doesn't expire! (It already exceed 60min). And I use the cache, and it still working. And after awhile, the cache start flushing. So I am...
2
2084
by: karunakar | last post by:
Hi All I dont want to expire the applicatoion Once login the application i dont want to expire the application Presently iam doing using cookies this is not working fine Please help me out I was doing like that
6
2583
by: Mustufa Baig | last post by:
Hi, I don't want to show the web page name shown in the address bar. For example if the website address is http://localhost/webreadfile/ so from this point forward, no matter which pages I surf, the address bar should look like http://localhost/webreadfile/. It should not show any page name. Thanks
23
3217
by: Phil Powell | last post by:
// OBTAINED FROM http://www.javascripter.net/faq/settinga.htm // NOTE THAT IF YOU SET days TO -1 THE COOKIE WILL BE SET TO YESTERDAY AND THUS EXPIRE function setCookie(name, value, days, docObj) { var today = new Date(); var expire = new Date(); if (days == null || isNaN(days) || days == 0) days = 1; if (days >= 1 || days < 0) expire.setTime(today.getTime() + 3600000 * 24 * days);
11
12129
by: EagleRed | last post by:
I am writing an ASP.NET 2.0 application that uses master pages. I have some pages that must not be cached on the client. In ASP.NET 1.1 I achieved this using metatags: <meta http-equiv="Expires" content="0"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Cache-Control" content="no-cache"> This tags are part of the <headelement. Sample code that I have seen shows how to add metatags of the form:
4
4677
by: orware | last post by:
Hi! This is my first post...and when I begin working on this project, it will also be my first PHP project! I do have some programming experience from my first year at college, but that was in Scheme :-). I have not started work on this problem yet, because I am still doing research and figuring out how I can do it using PHP. My goal is to turn this into a Joomla module that I can offer for free on Joomla.org and use on a few of the websites I...
0
1548
by: aspineux | last post by:
setacl and getacl look to be already "Cyrus" specific (according the doc), why not to extend imaplib a little bit more ? Here are some code I wrote and tested to support cyrus "expire" that manage how long a message can stay into a mailbox. This is usefull for NEWS server ! The code is preceded by lot of sample.
1
1388
by: Ananthu | last post by:
Hi I have designed a website in ASP.NET and if i leave any webpage for 2 or 3 minutes idle, the pages automatically expire. I am not able to open those pages in the brower without clearing the browsing history in the browser I have not used any timeout and expiry codings in my website. I want to know how to redirect to home page if any of the wepages expire and the home page should not expire. Please help me...
0
9687
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
9543
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,...
1
10237
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10029
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7567
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
6808
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();...
1
4144
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 we have to send another system
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
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.