Solved

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

Posted on 2006-11-07
6
1,318 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 

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

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
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…

777 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