• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 244
  • Last Modified:

asp.net FormsAthentication- Login page appears in new window

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
jjaqua
Asked:
jjaqua
  • 5
  • 2
1 Solution
 
ASPSQLServerCOMCommented:
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
 
jjaquaAuthor Commented:
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
 
ASPSQLServerCOMCommented:
Hi,
can u tell me the page sequence so i can assist u

Dipesh
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
jjaquaAuthor Commented:
What do you mean by page sequence?  I will post anything you need.
0
 
jjaquaAuthor Commented:
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
 
jjaquaAuthor Commented:
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
 
CleanupPingCommented:
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
 
jjaquaAuthor Commented:
Decreasing points
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now