Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2006-11-07
6
Medium Priority
?
1,332 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
[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
  • 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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 2000 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

Technology Partners: 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!

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
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.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

722 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