?
Solved

asp.net FormsAthentication- Login page appears in new window

Posted on 2003-02-20
8
Medium Priority
?
239 Views
Last Modified: 2008-02-26
This is my first post so forgive me if my question is somewhat stupid.

I'm using FormsAuthentication to allow access to an extranet site.  Everything works fine, but when the session times out and a user clicks a link that opens in a new window the redirect login page appears in the new window.  Since the new window is smaller it looks kind of funny.  Is there a way to automatically send a user back to the login page the second a session times out? Or before they click a link?

Thanks,

jjaqua
0
Comment
Question by:jjaqua
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
8 Comments
 
LVL 7

Expert Comment

by:ASPSQLServerCOM
ID: 7991529
hi,

from u r query i can guss is tht u r using frames and when user click in one frame the related content appears in another frame so when session time out at tht time when user click in particular frame then related page which is in another frame is get open but as session is time out it shows login page now in tht case u have to break/remove all the frame correct so do one thing add the following javascript in u r login page so when ever it gets loaded it will check for frame and if frame is found it get rid of it and user gets whole screen login page.

<SCRIPT LANGUAGE="JavaScript">
     if (self != top) top.location.replace(self.location);
          </SCRIPT>

Dipesh
0
 
LVL 5

Author Comment

by:jjaqua
ID: 7996097
I'm actually opening a new window using target="_blank"  and or javascript window.open() function.  When the new window pops up you get the login screen in the new window.
0
 
LVL 7

Accepted Solution

by:
ASPSQLServerCOM earned 225 total points
ID: 8006304
Hi,
can u tell me the page sequence so i can assist u

Dipesh
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Author Comment

by:jjaqua
ID: 8010498
What do you mean by page sequence?  I will post anything you need.
0
 
LVL 5

Author Comment

by:jjaqua
ID: 8010576
I have one page that pretty much controls everything using panels and xml controls.  When you try to access the page you are redirected to the login page using formsauthentication.

I'm retrieving all the files in a specified directory then creating links and binding them to a datagrid.  Each link uses target="_blank".  When you click a link after the session has timed out the new window opens and redirects you to the login page.  I would like to either have a timer that checks for expiration then automatically redirects you to the login page or when you click a link check for expiration and if session has expired redirect without opening link in new window.
0
 
LVL 5

Author Comment

by:jjaqua
ID: 8082343
This is a new question since I already answered my own and can't find a way to delete this one.

I'm creating an file upload page.  When you first load the page you can click "Refresh" and nothing will happen, but the second I upload a file, additional files will be uploaded evertime the refresh button is clicked.  I added a "Response.Write" withing the event and it gets executed when I refresh the page.  Why would this happen??
0
 

Expert Comment

by:CleanupPing
ID: 9576983
jjaqua:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 5

Author Comment

by:jjaqua
ID: 9584152
Decreasing points
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question