473,654 Members | 3,104 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Expiry in Forms authentication

Hello,

I have an web site which uses forms authentication. The
application uses frames. When the authentication time out occurs and if we
click on any one of the frames, each individual pages shows login page.
Is there any way out to show login page in whole page and not in
each individual frames. Else if there any event which is called when the
authentication cookie expires.

Thanks,
Sushi
Nov 16 '05 #1
2 1612
Sushi,

Frames are BAD (this is only one of the reasons).

The only way I can think to do this would be to have a handler in
Javascript for each page in the site. Basically, if the handler detects
that the page being loaded is a login page, then it should traverse the
frame heiarchy to the parent window, and force that window to reload.

However, this might not be possible, due to security issues (cross frame
scripting and the like). On the other hand, it might be allowed if all the
pages are from the same site.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"sushi" <su***@discussi ons.microsoft.c om> wrote in message
news:30******** *************** ***********@mic rosoft.com...
Hello,

I have an web site which uses forms authentication. The
application uses frames. When the authentication time out occurs and if we
click on any one of the frames, each individual pages shows login page.
Is there any way out to show login page in whole page and not in
each individual frames. Else if there any event which is called when the
authentication cookie expires.

Thanks,
Sushi

Nov 16 '05 #2
The easiest way to handle this is in the login page itself. Using
client-side javascript, simply detect whether the login page is loaded in
the topmost browser window. If not, redirect the topmost window to the
login page. e.g.:

if (window != window.top) window.top.loca tion.href = window.location .href;

Of course, this is likely to interfere some with post-login redirection.
Then again, the usual approach in a framed site is to redirect to the main
frame after even a post-timeout login, so perhaps this is something your
users can accept. If not, it is possible to set up a frameset to accept its
frame sources as request parameters, but care should be taken to ensure that
such a mechanism cannot be used to load pages from other sites inside your
frameset.

HTH,
Nicole

"sushi" <su***@discussi ons.microsoft.c om> wrote in message
news:30******** *************** ***********@mic rosoft.com...
Hello,

I have an web site which uses forms authentication. The
application uses frames. When the authentication time out occurs and if we
click on any one of the frames, each individual pages shows login page.
Is there any way out to show login page in whole page and not in
each individual frames. Else if there any event which is called when the
authentication cookie expires.

Thanks,
Sushi

Nov 16 '05 #3

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

Similar topics

6
4819
by: Billy Jacobs | last post by:
I have a website which has both secure and non-secure pages. I want to uses forms authentication. How do I accomplish this? Originally I had my web.config file in the root with Forms Authentication set up and it worked just fine. Then I realized that I needed to have some pages unsecure. I then created 2 directories. One named Secure and the other named Public. I placed my web.config file in my
3
9204
by: hasanainf | last post by:
Hi all, What will be the best database design for an inventory control that uses expiry date for its products. Over a period of time, a particular product will have many expiry date and that one particular expiry date could have multiple products I am thinking of two approaches not knowing which one to go for. First design is of one product having many expiry dates (a one to many
3
4861
by: Kris van der Mast | last post by:
Hi, I've created a little site for my sports club. In the root folder there are pages that are viewable by every anonymous user but at a certain subfolder my administration pages should be protected by forms authentication. When I create forms authentication at root level it works but when I move my code up to the subfolder I get this error: Server Error in '/TestProjects/FormsAuthenticationTestingArea' Application.
2
2494
by: Eric | last post by:
I am trying to build an app where the stuff in the root directory is open to all, but anything under the Restricted directory requires you to login and I want to use Forms to do it. I'm having trouble getting the web.config to work properly. First I tried to have a second web.config in the sub directory with authentication and authorization set to forms, but it blew up. Next, I tried to modify the root web.config in the following manner...
0
4218
by: Anonieko Ramos | last post by:
ASP.NET Forms Authentication Best Practices Dr. Dobb's Journal February 2004 Protecting user information is critical By Douglas Reilly Douglas is the author of Designing Microsoft ASP.NET Applications and owner of Access Microsystems. Doug can be reached at doug@accessmicrosystems.com. --------------------------------------------------------------------------------
1
1674
by: Andy Fish | last post by:
Hi, I have an asp.net web app whereby I authenticate the user with Forms Authentication and store details about him in the session. I want to be able to catch an event when the users authentication period expires but I can't see any way to do this. Currently I have set the forms authentication expiry shorter than the session expiry because I don't want a user logged in if his session details are invalid. I was thinking of setting the...
0
1730
by: robert | last post by:
I have noticed in .net 2 that when authenticating a user, setting the cookie using either redirectfromloginpage or setauthcookie, specifying true for the persistent parameter that the cookie is persistent with an expiry time of 30 minutes from now, unless you have specified a timeout attribute in the forms element in the web.config. Quoting from msdn: "timeout: Optional attribute. Specifies the time, in integer minutes, after which...
4
424
by: =?Utf-8?B?R3V1czEyMw==?= | last post by:
Hi, I created a web site on a remote server. To logon the user must enter a user id and password. The site is uses Forms Authentication. The web config file looks as follows: <configuration> <system.web> <customErrors mode="Off"/>
5
3546
by: Rory Becker | last post by:
Having now created a Custom MembershipProvider that seems to work correctly with my Logon and ChangePassword controls, I am, as they say, a happy bunny. The next stange is to move on to the creation of content which adjusts based on the user. I have several pages which require a user to be logged on and several which do not. Prior to this point in time I have used 2 different master pages. one with a control which checks a session...
0
8294
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
8816
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8494
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
7309
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...
0
4150
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
4297
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2719
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
1924
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1597
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.