Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Login page appears in all frames instead of on its own page

Status
Not open for further replies.

christheprogrammer

Programmer
Jul 10, 2000
258
CA
Hi,

Anyone heard of this? My login.aspx page sometimes loads into all frames of my default.aspx page when I try to load the default.aspx page while not yet logged on. As far as I can tell, what is supposed to happen is that if a user is not yet logged on (Forms based Authentication) and tries to access any page on that web, then he/she should be immidiately redirected to the login.aspx page. But what is happening is that the default.aspx page is being loaded, and then all the frames on it contain seperate instances of the login.aspx page...

Any ideas?
TIA Chris
 
Can we see some code? Especially the Default.aspx one and the Global.asax (if you have added anything).
Thanks
 
There is no code, the default.aspx page is just a page with 4 frames, a header, footer, menu, and main. They are set to load other ASPX pages.

The global.asax has no code added either, except for:

Application("SessionCount") -= 1

in the Session_End subroutine.

Here's the HTML for default.aspx:
<%@ Page CodeBehind=&quot;Default.aspx.vb&quot; Language=&quot;vb&quot; AutoEventWireup=&quot;false&quot; Inherits=&quot;MyPage._Default&quot; %>
<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Frameset//EN&quot;>
<HTML>
<HEAD>
<TITLE>My page</TITLE>
<meta content=&quot;Microsoft Visual Studio.NET 7.0&quot; name=&quot;GENERATOR&quot;>
<meta content=&quot; name=&quot;vs_targetSchema&quot;>
</HEAD>
<frameset rows=&quot;10%,80%,10%&quot;>
<frame id=&quot;Header&quot; name=&quot;header&quot; src=&quot;Header.aspx&quot; noResize scrolling=&quot;no&quot;>
<frameset cols=&quot;25%,75%&quot;>
<frame id=&quot;Contents&quot; name=&quot;contents&quot; src=&quot;MenuBar.aspx&quot;>
<frame id=&quot;Main&quot; name=&quot;main&quot; src=&quot;Welcome.aspx&quot;>
</frameset>
<frame id=&quot;Footer&quot; name=&quot;footer&quot; src=&quot;Footer.aspx&quot; noResize scrolling=&quot;no&quot;>
<noframes>
<pre id=&quot;p2&quot;>
</pre>
<p id=&quot;p1&quot;>
</p>
</noframes>
</frameset>
</HTML>

Thanks Chris
 
Hey chris? wouldn't the solution I had yesterday work for this as well. I believe that it should.

thread855-295979 [peace]
 
Yes, I thought that as well, Zar, I have implemented that solution, and it works like a charm. When a user signs off, the logoff occurs, and the frames page is no more... But if the user then attempts to access default.aspx again without closing the browser and re-launching it, he gets the 4-framed page loaded with all login pages... and then, only Sometimes. Chris
 
I am really not sure. Your going to need to isolate it so that you know what sequence of events is causing this. [peace]
 
Sometimes posting these problems prompts me to try something new, and I figured this out by doing so...

Since I'm using Forms authentication, the settings in the Web.config file must be correct. I forgot to add the following after the <authentication mode=&quot;Forms&quot;> tag:

<forms loginUrl = &quot;login.aspx&quot; name = &quot;.ASPXFORMSAUTH&quot; />

Now it works perfectly!
I'm still unsure as to why it worked sometimes before...

Cheers Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top