Solved

ASP.NET 2.0 - Login.aspx loses Master Page settings during runtime

Posted on 2006-11-07
6
1,320 Views
Last Modified: 2011-01-22
I have a Login.aspx page that I created based upon a "Template.master" page.  It looks fine in the designer but when I go to run it the login control shows up but there is no formatting almost as if the Template.master or CSS are disconnected.  I then login and everything is fine.  Weird.

The startup page is "Default.aspx" but the user is taken to the "Login.aspx" page because these "web.config" settings:

    <authorization>
        <deny users="?" />
    </authorization>
   
    <authentication mode="Forms">
      <forms loginUrl="Login.aspx" path="/" />
    </authentication>

Any ideas or thoughts are GREATLY appreciated,

Hammer
0
Comment
Question by:HAMMER33333
  • 3
  • 2
6 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17897548
Where is the CSS coming from--the template folder?

Bob
0
 

Author Comment

by:HAMMER33333
ID: 17898597
The Template.master is in the root directory and so is the CSS ("layout.css").  The CSS is linked like this:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="layout.css" />
<title>Testing</title>
<script type="text/javascript" >
    function PopTheWindow(pageName, pageFeatures)
    {
        window.open(pageName, null, pageFeatures);
    }
</script>
</head>
<body>
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17898696
Where is the login control in relation to Template.master?

Bob
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

 

Author Comment

by:HAMMER33333
ID: 17900946
The Login is an Aspx page (Login.aspx) based upon Template.master.  It is in the same directory as Template.master, the root directory.

It's HTML is:

<%@ Page Language="C#" MasterPageFile="~/Template.master" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" Title="Login" %>

<asp:Content ID="Content2" ContentPlaceHolderID="mainContent" Runat="Server" Visible="true">
    <asp:Login ID="Login1" runat="server">
    </asp:Login>
</asp:Content>

Weird stuff because it looks fine in the designer.

Hammer
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 17905454
That is too strange :(

Bob
0
 

Expert Comment

by:jmyonan
ID: 34675196
No one gave a solution to this problem...so here is the solution...

You need to set the authentication on the images/css folder to allow everyone.  It would look something like this in the web.config:

<location path="Images">    
    <system.web>        
        <authorization>            
             <allow users="*"/>        
        </authorization>    
    </system.web>
</location>
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.

Question has a verified solution.

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

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

821 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